Skip to content

Commit 8449e6e

Browse files
committed
use a specific type ignore for .__hash__ reassignment
1 parent ea70fd2 commit 8449e6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

babi/highlight.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
Captures = Tuple[Tuple[int, 'Rule'], ...]
2828

2929

30-
def uniquely_constructed(t: T) -> T:
30+
def uniquely_constructed(t: type[T]) -> type[T]:
3131
"""avoid tuple.__hash__ for "singleton" constructed objects"""
32-
t.__hash__ = object.__hash__ # type: ignore
32+
t.__hash__ = object.__hash__ # type: ignore[method-assign]
3333
return t
3434

3535

0 commit comments

Comments
 (0)