Skip to content

Commit

Permalink
Fix type assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Aug 26, 2024
1 parent f10af82 commit 7187888
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rapids_pre_commit_hooks/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,15 @@ def __init__(self, pos: _PosType) -> None:
self.pos: _PosType = pos

def __lt__(self, other: object) -> bool:
assert isinstance(other, LineComparator)
assert isinstance(other, int)
return self.pos[1] < other

def __gt__(self, other: object) -> bool:
assert isinstance(other, LineComparator)
assert isinstance(other, int)
return self.pos[0] > other

def __eq__(self, other: object) -> bool:
assert isinstance(other, LineComparator)
assert isinstance(other, int)
return self.pos[0] <= other <= self.pos[1]

line_index = bisect.bisect_left(
Expand Down

0 comments on commit 7187888

Please sign in to comment.