Skip to content

Commit 47338fd

Browse files
phi-fridaydbrattli
authored andcommitted
fix: rm type ignore
1 parent 7f672cf commit 47338fd

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

expression/collections/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def sum(self: TypedArray[_TSourceSum]) -> int:
385385
def sum_by(self, projection: Callable[[_TSource], _TSourceSum]) -> int:
386386
return pipe(
387387
self,
388-
sum_by(projection), # type: ignore
388+
sum_by(projection),
389389
)
390390

391391
def tail(self) -> TypedArray[_TSource]:

expression/collections/map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def of_seq(sequence: Iterable[tuple[_Key_, _Result]]) -> Map[_Key_, _Result]:
197197
"""
198198
return of_seq(sequence)
199199

200-
def __hash__(self) -> int: # type: ignore
200+
def __hash__(self) -> int:
201201
def combine_hash(x: int, y: int) -> int:
202202
return (x << 1) + y + 631
203203

expression/core/tagged_union.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def tagged_union(
4141

4242
def transform(cls: Any) -> Any:
4343
cls = dataclass(init=False, repr=False, order=False, eq=False, kw_only=True)(cls)
44-
fields_ = fields(cls) # type: ignore
44+
fields_ = fields(cls)
4545
field_names = tuple(f.name for f in fields_)
4646
original_init = cls.__init__
4747

@@ -65,7 +65,7 @@ def __init__(self: Any, **kwargs: Any) -> None:
6565

6666
# Enables the use of dataclasses.asdict
6767
union_fields = dict((f.name, f) for f in fields_ if f.name in [name, "tag"])
68-
object.__setattr__(self, "__dataclass_fields__", union_fields) # type: ignore
68+
object.__setattr__(self, "__dataclass_fields__", union_fields)
6969
original_init(self)
7070

7171
def __repr__(self: Any) -> str:
@@ -77,9 +77,9 @@ def __lt__(self: Any, other: Any) -> bool:
7777
if not isinstance(other, cls):
7878
return False
7979

80-
return (self._index, getattr(self, self.tag)) < (other._index, getattr(other, other.tag)) # type: ignore
80+
return (self._index, getattr(self, self.tag)) < (other._index, getattr(other, other.tag))
8181

82-
cls.__lt__ = __lt__ # type: ignore
82+
cls.__lt__ = __lt__
8383

8484
if frozen:
8585

expression/extra/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def cons(head: _A, tail: Block[_A]) -> Block[_A]:
264264
match parser_list:
265265
case block.empty:
266266
return preturn(block.empty)
267-
case Block([head, *tail]): # type: ignore
267+
case Block([head, *tail]):
268268
tail_ = sequence(Block(tail))
269269
return cons_p(head)(tail_)
270270
case _:

0 commit comments

Comments
 (0)