Fix mypy violations (with mypy-0.950)

This commit is contained in:
Takeshi KOMIYA
2022-04-30 22:13:40 +09:00
parent 4221d1a516
commit b048f17cda
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: