@@ -52,20 +52,40 @@ def report(
5252 """
5353
5454
55- class RuleOp :
55+ class RuleOp ( ABC ) :
5656 """Define the specific rule verification operation."""
5757
58- def dataset (self , ctx : RuleContext , node : DatasetNode ):
59- """Verify the given node."""
58+ def dataset (self , context : RuleContext , node : DatasetNode ) -> None :
59+ """Verify the given dataset node.
6060
61- def data_array (self , ctx : RuleContext , node : DataArrayNode ):
62- """Verify the given node."""
61+ Args:
62+ context: The current rule context.
63+ node: The dataset node.
64+ """
65+
66+ def data_array (self , context : RuleContext , node : DataArrayNode ) -> None :
67+ """Verify the given data array (variable) node.
68+
69+ Args:
70+ context: The current rule context.
71+ node: The data array (variable) node.
72+ """
6373
64- def attrs (self , ctx : RuleContext , node : AttrsNode ):
65- """Verify the given node."""
74+ def attrs (self , context : RuleContext , node : AttrsNode ) -> None :
75+ """Verify the given attributes node.
6676
67- def attr (self , ctx : RuleContext , node : AttrNode ):
68- """Verify the given node."""
77+ Args:
78+ context: The current rule context.
79+ node: The attributes node.
80+ """
81+
82+ def attr (self , context : RuleContext , node : AttrNode ) -> None :
83+ """Verify the given attribute node.
84+
85+ Args:
86+ context: The current rule context.
87+ node: The attribute node.
88+ """
6989
7090
7191@dataclass (frozen = True , kw_only = True )
@@ -113,8 +133,8 @@ class Rule:
113133 """Rule metadata of type `RuleMeta`."""
114134
115135 op_class : Type [RuleOp ]
116- """The class of the rule verifier .
117- Must implement the `RuleVerifier ` interface.
136+ """The class the implements the rule's verification operation .
137+ The class must implement the `RuleOp ` interface.
118138 """
119139
120140
0 commit comments