Skip to content

Commit 3c8df03

Browse files
committed
Clarify that subclass must implement the _aliases property
1 parent 894365d commit 3c8df03

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pygmt/params/base.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,14 @@ def __repr__(self):
6161
"""
6262
params = ", ".join(f"{k}={v!r}" for k, v in vars(self).items() if v is not None)
6363
return f"{self.__class__.__name__}({params})"
64+
65+
@property
66+
def _aliases(self):
67+
"""
68+
List of Alias objects representing the parameters of this class.
69+
70+
This property must be implemented in subclasses to define the parameters
71+
and their aliases.
72+
"""
73+
msg = "The _aliases property must be implemented in subclasses."
74+
raise NotImplementedError(msg)

0 commit comments

Comments
 (0)