Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)

This commit is contained in:
Alex Waygood
2022-01-18 15:14:03 +00:00
committed by GitHub
parent aa885ecd65
commit 8af5e0d340
264 changed files with 2217 additions and 2411 deletions

View File

@@ -1,4 +1,4 @@
from typing import IO, Any, Container, Dict, List, Sequence, Type
from typing import IO, Any, Container, Sequence
def bindtextdomain(domain: str, localedir: str = ...) -> str: ...
def bind_textdomain_codeset(domain: str, codeset: str = ...) -> str: ...
@@ -22,7 +22,7 @@ class NullTranslations(object):
def ngettext(self, singular: str, plural: str, n: int) -> str: ...
def lngettext(self, singular: str, plural: str, n: int) -> str: ...
def ungettext(self, singular: str | unicode, plural: str | unicode, n: int) -> unicode: ...
def info(self) -> Dict[str, str]: ...
def info(self) -> dict[str, str]: ...
def charset(self) -> str | None: ...
def output_charset(self) -> str | None: ...
def set_output_charset(self, charset: str | None) -> None: ...
@@ -34,12 +34,12 @@ class GNUTranslations(NullTranslations):
def find(
domain: str, localedir: str | None = ..., languages: Sequence[str] | None = ..., all: Any = ...
) -> str | List[str] | None: ...
) -> str | list[str] | None: ...
def translation(
domain: str,
localedir: str | None = ...,
languages: Sequence[str] | None = ...,
class_: Type[NullTranslations] | None = ...,
class_: type[NullTranslations] | None = ...,
fallback: bool = ...,
codeset: str | None = ...,
) -> NullTranslations: ...