Open
Description
It would be great if both the range value type and mapped value type could be annotated with type annotations, e.g.:
@dataclass
class Foo:
a: int
b: str
tree = IntervalTree[int, Foo]()
tree[2, 5] = Foo(123, 'test')
# linter should raise type error:
tree[1.4, 2.3] = Foo(123, 'test')
# linter should raise type error:
tree[2, 5] = 'invalid value type'
Metadata
Metadata
Assignees
Labels
No labels