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

View File

@@ -122,7 +122,7 @@ class RawConfigParser(_parser):
fallback: _T = ...,
) -> _T: ...
# This is incompatible with MutableMapping so we ignore the type
@overload # type: ignore
@overload # type: ignore[override]
def get(self, section: str, option: str, *, raw: bool = ..., vars: _section | None = ...) -> str: ...
@overload
def get(self, section: str, option: str, *, raw: bool = ..., vars: _section | None = ..., fallback: _T) -> str | _T: ...
@@ -153,7 +153,16 @@ class SectionProxy(MutableMapping[str, str]):
def parser(self) -> RawConfigParser: ...
@property
def name(self) -> str: ...
def get(self, option: str, fallback: str | None = ..., *, raw: bool = ..., vars: _section | None = ..., _impl: Any | None = ..., **kwargs: Any) -> str: ... # type: ignore
def get( # type: ignore[override]
self,
option: str,
fallback: str | None = ...,
*,
raw: bool = ...,
vars: _section | None = ...,
_impl: Any | None = ...,
**kwargs: Any,
) -> str: ...
# These are partially-applied version of the methods with the same names in
# RawConfigParser; the stubs should be kept updated together
@overload