We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c53b2de commit 1368d0eCopy full SHA for 1368d0e
src/reader/_storage/_sqlite_utils.py
@@ -23,6 +23,7 @@
23
from datetime import datetime
24
from datetime import timezone
25
from typing import Any
26
+from typing import cast
27
from typing import no_type_check
28
from typing import TypeVar
29
@@ -471,8 +472,9 @@ def __call__(self) -> sqlite3.Connection:
471
472
if not self._local.is_creating_thread:
473
self._other_threads = True
474
- self._local.db = db = sqlite3.connect(self.path, **self.kwargs)
475
- assert db is not None, "for mypy"
+ # TODO: remove needless cast (needed after mypy 1.16.0 update)
476
+ db = cast(sqlite3.Connection, sqlite3.connect(self.path, **self.kwargs))
477
+ self._local.db = db
478
self._local.call_count = 0
479
480
try:
0 commit comments