Fix some type errors in gettext in python2. (#469)

Also makes it look more like the python3 version
This commit is contained in:
David Euresti
2016-08-15 11:40:16 -07:00
committed by Matthias Kramm
parent 17f7d3db20
commit 69fdea09c9

View File

@@ -14,28 +14,30 @@ def lngettext(singular: str, plural: str, n: int) -> str: ...
def dngettext(domain: str, singular: str, plural: str, n: int) -> str: ...
def ldngettext(domain: str, singular: str, plural: str, n: int) -> str: ...
class Translations(object):
class NullTranslations(object):
def __init__(self, fp: IO[str] = ...) -> None: ...
def _parse(self, fp: IO[str]) -> None: ...
def add_fallback(self, fallback: Any) -> None: ...
def add_fallback(self, fallback: NullTranslations) -> None: ...
def gettext(self, message: str) -> str: ...
def lgettext(self, message: str) -> str: ...
def ugettext(self, message: str) -> unicode: ...
def ugettext(self, message: Union[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: str, plural: str, n: int) -> unicode: ...
def ungettext(self, singular: Union[str, unicode], plural: Union[str, unicode], n: int) -> unicode: ...
def info(self) -> Any: ...
def charset(self) -> Any: ...
def output_charset(self) -> Any: ...
def set_output_charset(self, charset: Any) -> None: ...
def install(self, unicode: bool = ..., names: Any = ...) -> None: ...
class NullTranslations(Translations): ...
class GNUTranslations(Translations): ...
class GNUTranslations(NullTranslations):
LE_MAGIC = ... # type: int
BE_MAGIC = ... # type: int
def find(domain: str, localedir: str = ..., languages: List[str] = ...,
all: Any = ...) -> Optional[Union[str, List[str]]]: ...
def translation(domain: str, localedir: str = ..., languages: List[str] = ...,
class_: Any = ..., fallback: Any = ..., codeset: Any = ...) -> Translations: ...
class_: Any = ..., fallback: Any = ..., codeset: Any = ...) -> NullTranslations: ...
def install(domain: str, localedir: str = ..., unicode: Any = ..., codeset: Any = ...,
names: Any = ...) -> None: ...