Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bdb81dc

Browse filesBrowse files
committed
Add Interval repr
add typing to repr Add repr docstring
1 parent 8573b0b commit bdb81dc
Copy full SHA for bdb81dc

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

‎src/napari_matplotlib/util.py

Copy file name to clipboardExpand all lines: src/napari_matplotlib/util.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ 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+
"""
33+
Get string representation.
34+
"""
35+
return f"Interval({self.lower}, {self.upper})"
36+
3137
def __contains__(self, val: int) -> bool:
3238
"""
3339
Return True if val is in the current interval.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.