Add mypy error codes to '# type: ignore' comments (#6379)

This commit is contained in:
Akuli
2021-11-26 08:07:56 +02:00
committed by GitHub
parent 1278fa86e2
commit a5bc1e037f
74 changed files with 218 additions and 202 deletions
+10 -10
View File
@@ -49,7 +49,7 @@ class ImmutableListMixin(Generic[_V]):
def reverse(self) -> NoReturn: ...
def sort(self, cmp: Any | None = ..., key: Any | None = ..., reverse: Any | None = ...) -> NoReturn: ...
class ImmutableList(ImmutableListMixin[_V], List[_V]): ... # type: ignore
class ImmutableList(ImmutableListMixin[_V], List[_V]): ... # type: ignore[misc]
class ImmutableDictMixin(object):
@classmethod
@@ -92,7 +92,7 @@ class TypeConversionDict(Dict[_K, _V]):
@overload
def get(self, key: _K, default: _D, type: Callable[[_V], _R]) -> _R | _D: ...
class ImmutableTypeConversionDict(ImmutableDictMixin, TypeConversionDict[_K, _V]): # type: ignore
class ImmutableTypeConversionDict(ImmutableDictMixin, TypeConversionDict[_K, _V]): # type: ignore[misc]
def copy(self) -> TypeConversionDict[_K, _V]: ...
def __copy__(self) -> ImmutableTypeConversionDict[_K, _V]: ...
@@ -242,7 +242,7 @@ class EnvironHeaders(ImmutableHeadersMixin, Headers):
def __iter__(self): ...
def copy(self): ...
class CombinedMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore
class CombinedMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore[misc]
def __reduce_ex__(self, protocol): ...
dicts: Any
def __init__(self, dicts: Any | None = ...): ...
@@ -266,15 +266,15 @@ class CombinedMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ig
class FileMultiDict(MultiDict[_K, _V]):
def add_file(self, name, file, filename: Any | None = ..., content_type: Any | None = ...): ...
class ImmutableDict(ImmutableDictMixin, Dict[_K, _V]): # type: ignore
class ImmutableDict(ImmutableDictMixin, Dict[_K, _V]): # type: ignore[misc]
def copy(self): ...
def __copy__(self): ...
class ImmutableMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore
class ImmutableMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore[misc]
def copy(self): ...
def __copy__(self): ...
class ImmutableOrderedMultiDict(ImmutableMultiDictMixin, OrderedMultiDict[_K, _V]): # type: ignore
class ImmutableOrderedMultiDict(ImmutableMultiDictMixin, OrderedMultiDict[_K, _V]): # type: ignore[misc]
def copy(self): ...
def __copy__(self): ...
@@ -288,8 +288,8 @@ class Accept(ImmutableList[Tuple[str, float]]):
@overload
def __getitem__(self, key: str) -> float: ...
def quality(self, key: str) -> float: ...
def __contains__(self, value: str) -> bool: ... # type: ignore
def index(self, key: str | tuple[str, float]) -> int: ... # type: ignore
def __contains__(self, value: str) -> bool: ... # type: ignore[override]
def index(self, key: str | tuple[str, float]) -> int: ... # type: ignore[override]
def find(self, key: str | tuple[str, float]) -> int: ...
def values(self) -> Iterator[str]: ...
def to_header(self) -> str: ...
@@ -323,7 +323,7 @@ class _CacheControl(UpdateDictMixin, Dict[str, Any]):
def __init__(self, values=..., on_update: Any | None = ...): ...
def to_header(self): ...
class RequestCacheControl(ImmutableDictMixin, _CacheControl): # type: ignore
class RequestCacheControl(ImmutableDictMixin, _CacheControl): # type: ignore[misc]
max_stale: Any
min_fresh: Any
no_transform: Any
@@ -403,7 +403,7 @@ class ContentRange:
def __nonzero__(self): ...
__bool__: Any
class Authorization(ImmutableDictMixin, Dict[str, Any]): # type: ignore
class Authorization(ImmutableDictMixin, Dict[str, Any]): # type: ignore[misc]
type: str
def __init__(self, auth_type: str, data: Mapping[str, Any] | None = ...) -> None: ...
@property