Skip to content

Commit 3c0d77b

Browse files
committed
Mention integer enums in the error message
1 parent 36f4b7e commit 3c0d77b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pygmt/accessors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ def registration(self, value):
153153
# TODO(Python>=3.12): Simplify to `if value not in GridRegistration`.
154154
if value not in GridRegistration.__members__.values():
155155
msg = (
156-
f"Invalid grid registration: '{value}'. "
157-
"Should be either GridRegistration.GRIDLINE (0) or GridRegistration.PIXEL (1)."
156+
f"Invalid grid registration: '{value}'. Should be either "
157+
"GridRegistration.GRIDLINE (0) or GridRegistration.PIXEL (1)."
158158
)
159159
raise GMTInvalidInput(msg)
160160
self._registration = GridRegistration(value)
@@ -172,7 +172,7 @@ def gtype(self, value):
172172
if value not in GridType.__members__.values():
173173
msg = (
174174
f"Invalid grid coordinate system type: '{value}'. "
175-
"Should be either GridType.CARTESIAN or GridType.GEOGRAPHIC."
175+
"Should be either GridType.CARTESIAN (0) or GridType.GEOGRAPHIC (1)."
176176
)
177177
raise GMTInvalidInput(msg)
178178
self._gtype = GridType(value)

0 commit comments

Comments
 (0)