Monkeytype pylib/anki/db.py

This commit is contained in:
Alan Du 2020-02-26 20:15:49 -05:00
parent 948c09e84b
commit 750a3e4aed

View File

@ -5,7 +5,7 @@ import os
import time
from sqlite3 import Cursor
from sqlite3 import dbapi2 as sqlite
from typing import Any, List
from typing import Any, List, Type
DBError = sqlite.Error
@ -110,5 +110,5 @@ class DB:
def _textFactory(self, data: bytes) -> str:
return str(data, errors="ignore")
def cursor(self, factory=Cursor) -> Cursor:
def cursor(self, factory: Type[Cursor] = Cursor) -> Cursor:
return self._db.cursor(factory)