diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-04-30 16:13:40 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-04-30 16:13:40 +0300 |
commit | b048f17cda17322b0f3580ac75796265074eb8c9 (patch) | |
tree | 358212b371d80aef94a90eb2617ca842aa703b65 | |
parent | 4221d1a5163d023d80a34bd4a12e9c2a2c648ae3 (diff) |
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: |