satisfy pyright 1.1.391
This commit is contained in:
parent
457857389a
commit
a2a6be536f
4 changed files with 9 additions and 9 deletions
|
|
@ -169,7 +169,7 @@ class Subconstruct(
|
|||
subcon: Construct[SubconParsedType, SubconBuildTypes],
|
||||
) -> None: ...
|
||||
@t.overload
|
||||
def __init__(
|
||||
def __init__( # type: ignore
|
||||
self,
|
||||
*args: t.Any,
|
||||
**kwargs: t.Any,
|
||||
|
|
@ -1110,9 +1110,9 @@ class Lazy(
|
|||
class LazyContainer(t.Generic[ContainerType], t.Dict[str, ContainerType]):
|
||||
def __getattr__(self, name: str) -> ContainerType: ...
|
||||
def __getitem__(self, index: t.Union[str, int]) -> ContainerType: ...
|
||||
def keys(self) -> t.Iterator[str]: ...
|
||||
def values(self) -> t.List[ContainerType]: ...
|
||||
def items(self) -> t.List[t.Tuple[str, ContainerType]]: ...
|
||||
def keys(self) -> t.Iterator[str]: ... # type: ignore
|
||||
def values(self) -> t.List[ContainerType]: ... # type: ignore
|
||||
def items(self) -> t.List[t.Tuple[str, ContainerType]]: ... # type: ignore
|
||||
|
||||
class LazyStruct(Construct[LazyContainer[t.Any], t.Optional[t.Dict[str, t.Any]]]):
|
||||
subcons: t.List[Construct[t.Any, t.Any]]
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ class ExprMixin(t.Generic[ReturnType], object):
|
|||
@t.overload
|
||||
def __eq__(self: ExprMixin[float], other: ConstOrCallable[float]) -> BinExpr[bool]: ...
|
||||
@t.overload
|
||||
def __eq__(self, other: t.Any) -> BinExpr[t.Any]: ...
|
||||
def __eq__(self, other: ConstOrCallable[t.Any]) -> BinExpr[t.Any]: ... # type: ignore
|
||||
|
||||
# __ne__ ###########################################################################################################
|
||||
@t.overload
|
||||
|
|
@ -487,7 +487,7 @@ class ExprMixin(t.Generic[ReturnType], object):
|
|||
@t.overload
|
||||
def __ne__(self: ExprMixin[float], other: ConstOrCallable[float]) -> BinExpr[bool]: ...
|
||||
@t.overload
|
||||
def __ne__(self, other: t.Any) -> BinExpr[t.Any]: ...
|
||||
def __ne__(self, other: t.Any) -> BinExpr[t.Any]: ... # type: ignore
|
||||
|
||||
# __neg__ ##########################################################################################################
|
||||
@t.overload
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ def recursion_lock(
|
|||
|
||||
class Container(t.Generic[ContainerType], t.Dict[str, ContainerType]):
|
||||
def __getattr__(self, name: str) -> ContainerType: ...
|
||||
def update(
|
||||
def update( # type: ignore
|
||||
self,
|
||||
seqordict: t.Union[t.Dict[str, ContainerType], t.Tuple[str, ContainerType]],
|
||||
) -> None: ...
|
||||
|
|
|
|||
|
|
@ -152,13 +152,13 @@ class DataclassStruct(Adapter[t.Any, t.Any, DataclassType, DataclassType]):
|
|||
Image(width=1, height=2, pixels=b'12')
|
||||
"""
|
||||
|
||||
subcon: "cs.Struct"
|
||||
subcon: "cs.Struct" # type: ignore
|
||||
def __init__(
|
||||
self,
|
||||
dc_type: t.Type[DataclassType],
|
||||
reverse: bool = False,
|
||||
) -> None:
|
||||
if not issubclass(dc_type, DataclassMixin):
|
||||
if not issubclass(dc_type, DataclassMixin): # type: ignore
|
||||
raise TypeError(f"'{repr(dc_type)}' has to be a '{repr(DataclassMixin)}'")
|
||||
if not dataclasses.is_dataclass(dc_type):
|
||||
raise TypeError(f"'{repr(dc_type)}' has to be a 'dataclasses.dataclass'")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue