Skip to content

Commit

Permalink
chore(docs): fixing docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
elhoangvu committed May 3, 2024
1 parent bf37418 commit 59bfda0
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
14 changes: 7 additions & 7 deletions src/dictrule/built_in_rules/comment_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def style() -> "CommentRule.Style":

@property
def prefix(self) -> str:
"""Getter for `prefix` property"""
"""Get the `prefix` property"""

return self._prefix

Expand Down Expand Up @@ -131,25 +131,25 @@ def style() -> "CommentRule.Style":

@property
def prefix(self) -> str:
"""Getter for `prefix` property"""
"""Get the `prefix` property"""

return self._prefix

@property
def open_comment(self) -> str:
"""Getter for `open_comment` property"""
"""Get the `open_comment` property"""

return self._open_comment

@property
def close_comment(self) -> str:
"""Getter for `close_comment` property"""
"""Get the `close_comment` property"""

return self._close_comment

@property
def name(self) -> str:
"""Getter for `name` property"""
"""Get the `name` property"""

return CommentRule.CONTEXT_NAME

Expand All @@ -172,13 +172,13 @@ def __init__(

@property
def singleline(self) -> SinglelineComment:
"""Getter for `singleline` property"""
"""Get the `singleline` property"""

return self._singleline

@property
def multiline(self) -> MultilineComment:
"""Getter for `multiline` property"""
"""Get the `multiline` property"""

return self._multiline

Expand Down
8 changes: 4 additions & 4 deletions src/dictrule/built_in_rules/eval_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,19 @@ class ContextCase(Context.Case):

@property
def name(self) -> str:
"""Getter for `name` property"""
"""Get the `name` property"""

return EvalRule.CONTEXT_NAME

@property
def evaluator_list(self) -> List["EvalRule.Evaluable"]:
"""Getter for `evaluator_list` property"""
"""Get the `evaluator_list` property"""

return self._evaluator_list

@property
def fallback(self) -> Optional["EvalRule.Evaluable"]:
"""Getter for `fallback` property"""
"""Get the `fallback` property"""

return self._fallback

Expand All @@ -138,7 +138,7 @@ def __init__(
evaluators: List["EvalRule.Evaluable"],
fallback: Optional["EvalRule.Evaluable"] = None,
):
"""Initialization method for `EvalRule.ContextCase`.
"""Constructor method for `EvalRule.ContextCase`.
Args:
evaluators (List["EvalRule.Evaluable"]): List of evaluators.
Expand Down
4 changes: 2 additions & 2 deletions src/dictrule/built_in_rules/for_in_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ class ForInEval(EvalRule.Evaluable):

@property
def name(self) -> str:
"""Getter for `name` property"""
"""Get the `name` property"""

return self._var_name

@property
def prefix_matching(self) -> bool:
"""Getter for `prefix_matching` property"""
"""Get the `prefix_matching` property"""

return True

Expand Down
4 changes: 2 additions & 2 deletions src/dictrule/built_in_rules/indent_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ContextCase(Context.Case):

@property
def name(self) -> str:
"""Getter for `name` property"""
"""Get the `name` property"""

return "indent"

Expand All @@ -62,7 +62,7 @@ def __init__(

@property
def num_spaces(self) -> int:
"""Getter for `num_spaces` property"""
"""Get the `num_spaces` property"""

return self._num_spaces

Expand Down
8 changes: 4 additions & 4 deletions src/dictrule/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Case(ABC):

@property
def name(self) -> str:
"""Getter for case name, matching the defined rule
"""Get the case name, matching the defined rule
Returns:
str: A rule name
Expand All @@ -35,7 +35,7 @@ def __init__(
self,
cases: List[Case],
) -> None:
"""Initialization method of `Context` class
"""Constructor method of `Context` class
Args:
cases (List[Case]): List of `Context.Case` to build the case map
Expand All @@ -55,7 +55,7 @@ def __init__(

@property
def cases(self) -> List[Case]:
"""Getter for `cases` property
"""Get the `cases` property
Returns:
List[Case]: list of cases
Expand All @@ -64,7 +64,7 @@ def cases(self) -> List[Case]:

@property
def case_map(self) -> Dict[str, Case]:
"""Getter for `case_map` property
"""Get the `case_map` property
Returns:
Dict[str, Case]: map of cases [name: str, case: Context.Case]
Expand Down
2 changes: 1 addition & 1 deletion src/dictrule/dr_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(
optional: bool = False,
prefix_matching: bool = False,
):
"""Initialization method of `dr_property`
"""Constructor method of `dr_property`
Args:
optional (bool, optional): Indicates if the property is optional
Expand Down
6 changes: 3 additions & 3 deletions src/dictrule/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(
gen_rules: List[Union[str, Dict[str, Any]]],
parse_rules: Optional[List[Rule]] = None,
):
"""Initialization method for DictRule.
"""Constructor method for DictRule.
Args:
gen_rules (List[Union[str, Dict[str, Any]]]): List or dictionary of rules
Expand All @@ -76,13 +76,13 @@ def __init__(

@property
def parse_rules(self) -> List[Rule]:
"""Getter for `parse_rules` property"""
"""Get the `parse_rules` property"""

return self._parse_rules

@property
def gen_rules(self) -> List[Union[str, Dict[str, Any]]]:
"""Getter for `gen_rules` property"""
"""Get the `gen_rules` property"""

return self._gen_rules

Expand Down

0 comments on commit 59bfda0

Please sign in to comment.