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

@@ -36,10 +36,10 @@ class _GeneratorContextManager(AbstractContextManager[_T_co]):
def __call__(self, func: _F) -> _F: ...
# type ignore to deal with incomplete ParamSpec support in mypy
def contextmanager(func: Callable[_P, Iterator[_T]]) -> Callable[_P, _GeneratorContextManager[_T]]: ... # type: ignore
def contextmanager(func: Callable[_P, Iterator[_T]]) -> Callable[_P, _GeneratorContextManager[_T]]: ... # type: ignore[misc]
if sys.version_info >= (3, 7):
def asynccontextmanager(func: Callable[_P, AsyncIterator[_T]]) -> Callable[_P, AbstractAsyncContextManager[_T]]: ... # type: ignore
def asynccontextmanager(func: Callable[_P, AsyncIterator[_T]]) -> Callable[_P, AbstractAsyncContextManager[_T]]: ... # type: ignore[misc]
class _SupportsClose(Protocol):
def close(self) -> object: ...