diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-04-30 16:27:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-30 16:27:25 +0300 |
commit | 2a354d48dc3508341e3043b7ebd487cb34cb42c2 (patch) | |
tree | 91d3ec27f371c06a530220d927c8ea01e343c5dc | |
parent | e7cba3516e6e3cd1cf90c29068c63c011e860204 (diff) | |
parent | b048f17cda17322b0f3580ac75796265074eb8c9 (diff) |
Merge pull request #10401 from tk0miya/mypy-0.950
Fix mypy violations (with mypy-0.950)
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | sphinx/domains/python.py | 2 | ||||
-rw-r--r-- | sphinx/locale/__init__.py | 6 |
3 files changed, 5 insertions, 5 deletions
@@ -43,7 +43,7 @@ extras_require = { 'lint': [ 'flake8>=3.5.0', 'isort', - 'mypy>=0.931', + 'mypy>=0.950', 'docutils-stubs', "types-typed-ast", "types-requests", diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index f55d76ba0..98162f699 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -1466,7 +1466,7 @@ def builtin_resolver(app: Sphinx, env: BuildEnvironment, if s.startswith('typing.'): s = s.split('.', 1)[1] - return s in typing.__all__ # type: ignore + return s in typing.__all__ if node.get('refdomain') != 'py': return None diff --git a/sphinx/locale/__init__.py b/sphinx/locale/__init__.py index b9bdff0f9..ae320054a 100644 --- a/sphinx/locale/__init__.py +++ b/sphinx/locale/__init__.py @@ -59,19 +59,19 @@ class _TranslationProxy(UserString): def __add__(self, other: str) -> str: # type: ignore return self.data + other - def __radd__(self, other: str) -> str: + def __radd__(self, other: str) -> str: # type: ignore return other + self.data def __mod__(self, other: str) -> str: # type: ignore return self.data % other - def __rmod__(self, other: str) -> str: + def __rmod__(self, other: str) -> str: # type: ignore return other % self.data def __mul__(self, other: Any) -> str: # type: ignore return self.data * other - def __rmul__(self, other: Any) -> str: + def __rmul__(self, other: Any) -> str: # type: ignore return other * self.data def __getattr__(self, name: str) -> Any: |