Skip to content

Commit

Permalink
better type ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
frrad committed Sep 2, 2024
1 parent cc119c8 commit 1971df5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pulp/sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,9 @@ def addcol(self, col: int, rowitems: Dict[int, T]) -> None:
def get( # type: ignore[override]
self,
coords: Tuple[int, int],
default: int = 0,
default: T = 0, # type: ignore[assignment]
) -> T:
# not actually true unless T == int
cast(T, default)

return cast(T, dict.get(self, coords, default))
return dict.get(self, coords, default)

def col_based_arrays(
self,
Expand Down

0 comments on commit 1971df5

Please sign in to comment.