diff --git a/sphinx/config.py b/sphinx/config.py index 1f80ab366..c938c834e 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -122,7 +122,7 @@ class Config(object): rst_epilog = (None, 'env', string_classes), rst_prolog = (None, 'env', string_classes), trim_doctest_flags = (True, 'env'), - primary_domain = ('py', 'env', [NoneType]), + primary_domain = ('py', 'env', [NoneType]), # type: ignore needs_sphinx = (None, None, string_classes), needs_extensions = ({}, None), manpages_url = (None, 'env'), diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py index 2818ab3c7..0c83a4e25 100644 --- a/sphinx/ext/autosummary/generate.py +++ b/sphinx/ext/autosummary/generate.py @@ -120,7 +120,7 @@ def generate_autosummary_docs(sources, output_dir=None, suffix='.rst', else: if template_dir: template_dirs.insert(0, template_dir) - template_loader = FileSystemLoader(template_dirs) # type: ignore + template_loader = FileSystemLoader(template_dirs) template_env = SandboxedEnvironment(loader=template_loader) template_env.filters['underline'] = _underline diff --git a/sphinx/locale/__init__.py b/sphinx/locale/__init__.py index e148f2c12..ae86686e8 100644 --- a/sphinx/locale/__init__.py +++ b/sphinx/locale/__init__.py @@ -58,7 +58,7 @@ class _TranslationProxy(UserString, object): # replace function from UserString; it instantiates a self.__class__ # for the encoding result - def encode(self, encoding=None, errors=None): + def encode(self, encoding=None, errors=None): # type: ignore # type: (unicode, unicode) -> str if encoding: if errors: @@ -82,7 +82,7 @@ class _TranslationProxy(UserString, object): return dir(text_type) def __iter__(self): - # type: () -> Iterator[unicode] + # type: () -> Iterator return iter(self.data) def __len__(self): @@ -97,15 +97,15 @@ class _TranslationProxy(UserString, object): # type: () -> unicode return text_type(self.data) - def __add__(self, other): + def __add__(self, other): # type: ignore # type: (unicode) -> unicode return self.data + other - def __radd__(self, other): + def __radd__(self, other): # type: ignore # type: (unicode) -> unicode return other + self.data - def __mod__(self, other): + def __mod__(self, other): # type: ignore # type: (unicode) -> unicode return self.data % other @@ -113,11 +113,11 @@ class _TranslationProxy(UserString, object): # type: (unicode) -> unicode return other % self.data - def __mul__(self, other): + def __mul__(self, other): # type: ignore # type: (Any) -> unicode return self.data * other - def __rmul__(self, other): + def __rmul__(self, other): # type: ignore # type: (Any) -> unicode return other * self.data @@ -159,7 +159,7 @@ class _TranslationProxy(UserString, object): # type: (Tuple[Callable, Tuple[unicode]]) -> None self._func, self._args = tup - def __getitem__(self, key): + def __getitem__(self, key): # type: ignore # type: (Any) -> unicode return self.data[key]