Merge pull request #10401 from tk0miya/mypy-0.950

Fix mypy violations (with mypy-0.950)
This commit is contained in:
Takeshi KOMIYA 2022-04-30 22:27:25 +09:00 committed by GitHub
commit 2a354d48dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -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",

View File

@ -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

View File

@ -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: