Skip to content

Commit 367d61f

Browse files
committed
Use constants from interface definition
1 parent 75bc9df commit 367d61f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

astrowidgets/ginga.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
from ginga.web.jupyterw.ImageViewJpw import EnhancedCanvasView
2222
from ginga.util.wcs import ra_deg_to_str, dec_deg_to_str
2323

24+
from astrowidgets.interface_definition import (
25+
ALLOWED_CURSOR_LOCATIONS,
26+
RESERVED_MARKER_SET_NAMES
27+
)
28+
2429
__all__ = ['ImageWidget']
2530

2631

@@ -50,10 +55,10 @@ class ImageWidget(ipyw.VBox):
5055
5156
"""
5257
# Allowed locations for cursor display
53-
ALLOWED_CURSOR_LOCATIONS = ('top', 'bottom', None)
58+
ALLOWED_CURSOR_LOCATIONS = ALLOWED_CURSOR_LOCATIONS
5459

5560
# List of marker names that are for internal use only
56-
RESERVED_MARKER_SET_NAMES = ('all', )
61+
RESERVED_MARKER_SET_NAMES = RESERVED_MARKER_SET_NAMES
5762

5863
def __init__(self, logger=None, image_width=500, image_height=500,
5964
pixel_coords_offset=0, **kwargs):

astrowidgets/interface_definition.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class ImageViewerInterface(Protocol):
3131
# viewer: Any
3232

3333
# Allowed locations for cursor display
34-
ALLOWED_CURSOR_LOCATIONS = ('top', 'bottom', None)
34+
ALLOWED_CURSOR_LOCATIONS : tuple = ALLOWED_CURSOR_LOCATIONS
3535

3636
# List of marker names that are for internal use only
37-
RESERVED_MARKER_SET_NAMES = ('all', )
37+
RESERVED_MARKER_SET_NAMES : tuple = RESERVED_MARKER_SET_NAMES
3838

3939
# The methods, grouped loosely by purpose
4040

0 commit comments

Comments
 (0)