mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Monkeytype pylib/anki/db.py
This commit is contained in:
parent
948c09e84b
commit
750a3e4aed
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ import os
|
||||||
import time
|
import time
|
||||||
from sqlite3 import Cursor
|
from sqlite3 import Cursor
|
||||||
from sqlite3 import dbapi2 as sqlite
|
from sqlite3 import dbapi2 as sqlite
|
||||||
from typing import Any, List
|
from typing import Any, List, Type
|
||||||
|
|
||||||
DBError = sqlite.Error
|
DBError = sqlite.Error
|
||||||
|
|
||||||
|
@ -110,5 +110,5 @@ class DB:
|
||||||
def _textFactory(self, data: bytes) -> str:
|
def _textFactory(self, data: bytes) -> str:
|
||||||
return str(data, errors="ignore")
|
return str(data, errors="ignore")
|
||||||
|
|
||||||
def cursor(self, factory=Cursor) -> Cursor:
|
def cursor(self, factory: Type[Cursor] = Cursor) -> Cursor:
|
||||||
return self._db.cursor(factory)
|
return self._db.cursor(factory)
|
||||||
|
|
Loading…
Reference in a new issue