Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -1,4 +1,4 @@
from typing import IO, Any, Container, Dict, List, Optional, Sequence, Type, Union
from typing import IO, Any, Container, Dict, List, Sequence, Type
def bindtextdomain(domain: str, localedir: str = ...) -> str: ...
def bind_textdomain_codeset(domain: str, codeset: str = ...) -> str: ...
@@ -18,14 +18,14 @@ class NullTranslations(object):
def add_fallback(self, fallback: NullTranslations) -> None: ...
def gettext(self, message: str) -> str: ...
def lgettext(self, message: str) -> str: ...
def ugettext(self, message: Union[str, unicode]) -> unicode: ...
def ugettext(self, message: str | unicode) -> unicode: ...
def ngettext(self, singular: str, plural: str, n: int) -> str: ...
def lngettext(self, singular: str, plural: str, n: int) -> str: ...
def ungettext(self, singular: Union[str, unicode], plural: Union[str, unicode], n: int) -> unicode: ...
def ungettext(self, singular: str | unicode, plural: str | unicode, n: int) -> unicode: ...
def info(self) -> Dict[str, str]: ...
def charset(self) -> Optional[str]: ...
def output_charset(self) -> Optional[str]: ...
def set_output_charset(self, charset: Optional[str]) -> None: ...
def charset(self) -> str | None: ...
def output_charset(self) -> str | None: ...
def set_output_charset(self, charset: str | None) -> None: ...
def install(self, unicode: bool = ..., names: Container[str] = ...) -> None: ...
class GNUTranslations(NullTranslations):
@@ -33,16 +33,16 @@ class GNUTranslations(NullTranslations):
BE_MAGIC: int
def find(
domain: str, localedir: Optional[str] = ..., languages: Optional[Sequence[str]] = ..., all: Any = ...
) -> Optional[Union[str, List[str]]]: ...
domain: str, localedir: str | None = ..., languages: Sequence[str] | None = ..., all: Any = ...
) -> str | List[str] | None: ...
def translation(
domain: str,
localedir: Optional[str] = ...,
languages: Optional[Sequence[str]] = ...,
class_: Optional[Type[NullTranslations]] = ...,
localedir: str | None = ...,
languages: Sequence[str] | None = ...,
class_: Type[NullTranslations] | None = ...,
fallback: bool = ...,
codeset: Optional[str] = ...,
codeset: str | None = ...,
) -> NullTranslations: ...
def install(
domain: str, localedir: Optional[str] = ..., unicode: bool = ..., codeset: Optional[str] = ..., names: Container[str] = ...
domain: str, localedir: str | None = ..., unicode: bool = ..., codeset: str | None = ..., names: Container[str] = ...
) -> None: ...