Add types for gettext (#217)

* Add empty stubs for gettext Translations subclasses

GNUTranslations and NullTranslations do not add any methods to the base
Translations class, so remove the TODO comment and just declare the
classes.

* Add missing types for py3 gettext.
This commit is contained in:
David Shea
2016-05-19 17:34:38 -04:00
committed by Guido van Rossum
parent 2bb026cd76
commit 8503f13a41
2 changed files with 38 additions and 32 deletions

View File

@@ -29,7 +29,8 @@ class Translations(object):
def set_output_charset(self, charset: Any) -> None: ...
def install(self, unicode: bool = ..., names: Any = ...) -> None: ...
# TODO: NullTranslations, GNUTranslations
class NullTranslations(Translations): ...
class GNUTranslations(Translations): ...
def find(domain: str, localedir: str = ..., languages: List[str] = ...,
all: Any = ...) -> Optional[Union[str, List[str]]]: ...