Skip to content

Commit

Permalink
Typeshed cherry-picks: gettext and sqlite3 fixes (#12797)
Browse files Browse the repository at this point in the history
* gettext: Make GNUTranslations.CONTEXT not final (python/typeshed#7841)
* sqlite3: Avoid optional type for 'description' (python/typeshed#7842)
  • Loading branch information
JukkaL authored May 16, 2022
1 parent 3b7468e commit e6bbf5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mypy/typeshed/stdlib/gettext.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class NullTranslations:
class GNUTranslations(NullTranslations):
LE_MAGIC: Final[int]
BE_MAGIC: Final[int]
CONTEXT: Final[str]
CONTEXT: str
VERSIONS: Sequence[int]

@overload # ignores incompatible overloads
Expand Down
3 changes: 2 additions & 1 deletion mypy/typeshed/stdlib/sqlite3/dbapi2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,9 @@ class Cursor(Iterator[Any]):
arraysize: int
@property
def connection(self) -> Connection: ...
# May be None, but using | Any instead to avoid slightly annoying false positives.
@property
def description(self) -> tuple[tuple[str, None, None, None, None, None, None], ...] | None: ...
def description(self) -> tuple[tuple[str, None, None, None, None, None, None], ...] | Any: ...
@property
def lastrowid(self) -> int | None: ...
row_factory: Callable[[Cursor, Row[Any]], object] | None
Expand Down

0 comments on commit e6bbf5f

Please sign in to comment.