From 71878889919dbd0f60ec40da745135f1c52d0f35 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 26 Aug 2024 14:07:42 -0400 Subject: [PATCH] Fix type assertion --- src/rapids_pre_commit_hooks/lint.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rapids_pre_commit_hooks/lint.py b/src/rapids_pre_commit_hooks/lint.py index 670a6a7..d10cbff 100644 --- a/src/rapids_pre_commit_hooks/lint.py +++ b/src/rapids_pre_commit_hooks/lint.py @@ -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(