Skip to content

Commit 14537c2

Browse files
committed
mypy: ignore-errors in typing.py
It is not even close to being useful
1 parent a9942cb commit 14537c2

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

typemap/typing.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
# mypy: ignore-errors
2+
13
import contextvars
24
import typing
35
import types
46

57
from typing import Literal, Unpack
6-
from typing import _GenericAlias, _LiteralGenericAlias, _UnpackGenericAlias # type: ignore
8+
from typing import _GenericAlias, _LiteralGenericAlias, _UnpackGenericAlias
79

810
_SpecialForm: typing.Any = typing._SpecialForm
911

@@ -29,12 +31,12 @@ def __class_getitem__(cls, args):
2931
# Probably these exact hacks will need to go into our
3032
# typing_extensions version of this, but for the typing version they
3133
# can get merged into real classes.
32-
class _IterSafeGenericAlias(_GenericAlias, _root=True): # type: ignore[call-arg]
34+
class _IterSafeGenericAlias(_GenericAlias, _root=True):
3335
def __iter__(self):
3436
yield _IterSafeUnpackGenericAlias(origin=Unpack, args=(self,))
3537

3638

37-
class _IterSafeUnpackGenericAlias(_UnpackGenericAlias, _root=True): # type: ignore[call-arg]
39+
class _IterSafeUnpackGenericAlias(_UnpackGenericAlias, _root=True):
3840
@property
3941
def __typing_unpacked_tuple_args__(self):
4042
# This is basically the same as in _UnpackGenericAlias except
@@ -86,8 +88,8 @@ class InitField[KwargDict: BaseTypedDict]:
8688

8789
__kwargs: KwargDict
8890

89-
def __init__(self, **kwargs: typing.Unpack[KwargDict]) -> None: # type: ignore[misc]
90-
self.__kwargs = kwargs # type: ignore[assignment]
91+
def __init__(self, **kwargs: typing.Unpack[KwargDict]) -> None:
92+
self.__kwargs = kwargs
9193

9294
def get_kwargs(self) -> KwargDict:
9395
return self.__kwargs
@@ -252,7 +254,7 @@ class RaiseError[S: str, *Ts]:
252254
] = contextvars.ContextVar("special_form_evaluator", default=None)
253255

254256

255-
class _IterGenericAlias(_GenericAlias, _root=True): # type: ignore[call-arg]
257+
class _IterGenericAlias(_GenericAlias, _root=True):
256258
def __iter__(self):
257259
evaluator = special_form_evaluator.get()
258260
if evaluator:
@@ -266,7 +268,7 @@ def Iter(self, tp):
266268
return _IterGenericAlias(self, (tp,))
267269

268270

269-
class _BoolGenericAlias(_GenericAlias, _root=True): # type: ignore[call-arg]
271+
class _BoolGenericAlias(_GenericAlias, _root=True):
270272
def __bool__(self):
271273
evaluator = special_form_evaluator.get()
272274
if evaluator:
@@ -300,7 +302,7 @@ def Bool(self, tp):
300302
return _BoolGenericAlias(self, tp)
301303

302304

303-
class _BoolLiteralGenericAlias(_LiteralGenericAlias, _root=True): # type: ignore[call-arg]
305+
class _BoolLiteralGenericAlias(_LiteralGenericAlias, _root=True):
304306
def __bool__(self):
305307
return typing.get_args(self)[0]
306308

0 commit comments

Comments
 (0)