Skip to content

Commit e6bbf5f

Browse files
authored
Typeshed cherry-picks: gettext and sqlite3 fixes (#12797)
* gettext: Make GNUTranslations.CONTEXT not final (python/typeshed#7841) * sqlite3: Avoid optional type for 'description' (python/typeshed#7842)
1 parent 3b7468e commit e6bbf5f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

mypy/typeshed/stdlib/gettext.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class NullTranslations:
9696
class GNUTranslations(NullTranslations):
9797
LE_MAGIC: Final[int]
9898
BE_MAGIC: Final[int]
99-
CONTEXT: Final[str]
99+
CONTEXT: str
100100
VERSIONS: Sequence[int]
101101

102102
@overload # ignores incompatible overloads

mypy/typeshed/stdlib/sqlite3/dbapi2.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,9 @@ class Cursor(Iterator[Any]):
374374
arraysize: int
375375
@property
376376
def connection(self) -> Connection: ...
377+
# May be None, but using | Any instead to avoid slightly annoying false positives.
377378
@property
378-
def description(self) -> tuple[tuple[str, None, None, None, None, None, None], ...] | None: ...
379+
def description(self) -> tuple[tuple[str, None, None, None, None, None, None], ...] | Any: ...
379380
@property
380381
def lastrowid(self) -> int | None: ...
381382
row_factory: Callable[[Cursor, Row[Any]], object] | None

0 commit comments

Comments
 (0)