Skip to content

Commit d1c7266

Browse files
committed
Add Interval repr
add typing to repr
1 parent ade4d13 commit d1c7266

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/napari_matplotlib/util.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ def __init__(self, lower_bound: Optional[int], upper_bound: Optional[int]):
2828
self.lower = lower_bound
2929
self.upper = upper_bound
3030

31+
def __repr__(self) -> str:
32+
return f"Interval({self.lower}, {self.upper})"
33+
3134
def __contains__(self, val: int) -> bool:
3235
"""
3336
Return True if val is in the current interval.

0 commit comments

Comments
 (0)