File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 22Base class for common parameters shared in PyGMT.
33"""
44
5-
6- from abc import ABC , abstractmethod , abstractproperty
5+ from abc import ABC , abstractmethod
76
87
98class BaseParam (ABC ):
@@ -61,25 +60,22 @@ def __post_init__(self):
6160 """
6261 self ._validate ()
6362
64- @abstractmethod
65- def _validate (self ):
63+ def _validate (self ): # noqa: B027
6664 """
6765 Validate the parameters of the object.
6866
69- This method should be overridden in subclasses to perform any necessary
67+ Optional method but can be overridden in subclasses to perform any necessary
7068 validation on the parameters.
7169 """
7270
73- @abstractproperty
71+ @property
72+ @abstractmethod
7473 def _aliases (self ):
7574 """
7675 List of Alias objects representing the parameters of this class.
7776
78- This property must be implemented in subclasses to define the parameters
79- and their aliases.
77+ Must be implemented in subclasses to define the parameters and their aliases.
8078 """
81- msg = "The _aliases property must be implemented in subclasses."
82- raise NotImplementedError (msg )
8379
8480 def __str__ (self ):
8581 """
You can’t perform that action at this time.
0 commit comments