mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add mypy error codes to '# type: ignore' comments (#6379)
This commit is contained in:
@@ -36,7 +36,7 @@ _V_co = TypeVar("_V_co", covariant=True)
|
||||
|
||||
@final
|
||||
class _Cell:
|
||||
__hash__: None # type: ignore
|
||||
__hash__: None # type: ignore[assignment]
|
||||
cell_contents: Any
|
||||
|
||||
@final
|
||||
@@ -149,7 +149,7 @@ class CodeType:
|
||||
|
||||
@final
|
||||
class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]):
|
||||
__hash__: None # type: ignore
|
||||
__hash__: None # type: ignore[assignment]
|
||||
def __init__(self, mapping: Mapping[_KT, _VT_co]) -> None: ...
|
||||
def __getitem__(self, k: _KT) -> _VT_co: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
@@ -165,7 +165,7 @@ class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]):
|
||||
def __ror__(self, __value: Mapping[_T1, _T2]) -> dict[_KT | _T1, _VT_co | _T2]: ...
|
||||
|
||||
class SimpleNamespace:
|
||||
__hash__: None # type: ignore
|
||||
__hash__: None # type: ignore[assignment]
|
||||
def __init__(self, **kwargs: Any) -> None: ...
|
||||
def __getattribute__(self, name: str) -> Any: ...
|
||||
def __setattr__(self, name: str, value: Any) -> None: ...
|
||||
@@ -382,9 +382,9 @@ _P = ParamSpec("_P")
|
||||
|
||||
# it's not really an Awaitable, but can be used in an await expression. Real type: Generator & Awaitable
|
||||
@overload
|
||||
def coroutine(func: Callable[_P, Generator[_R, Any, Any]]) -> Callable[_P, Awaitable[_R]]: ... # type: ignore
|
||||
def coroutine(func: Callable[_P, Generator[_R, Any, Any]]) -> Callable[_P, Awaitable[_R]]: ... # type: ignore[misc]
|
||||
@overload
|
||||
def coroutine(func: _Fn) -> _Fn: ... # type: ignore
|
||||
def coroutine(func: _Fn) -> _Fn: ... # type: ignore[misc]
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
CellType = _Cell
|
||||
|
||||
Reference in New Issue
Block a user