Skip to content

Commit

Permalink
docs: Update docstring to corrert term
Browse files Browse the repository at this point in the history
  • Loading branch information
junghoon-vans committed Dec 22, 2022
1 parent d5d6b9f commit f60d1e4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions varst/utils/substitution.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ def __init__(self, rst_file: RstFile):
self.rst_file = rst_file

def find(self, name: str) -> str:
"""Find substitution text by name.
"""Find substitution definition by name.
Args:
name: The string value of substitution name.
Returns:
Returns substitution text if substitution exists.
Returns substitution definition if it exists.
Raises:
KeyError: If substitution is not in file.
KeyError: If substitution definition is not in file.
"""
pattern = fr"""\.\.[ ]+\|({name})\|"""
Expand All @@ -27,7 +27,7 @@ def find(self, name: str) -> str:
raise KeyError(name)

def update(self, name: str, value: str) -> None:
"""Update substitution text with name to value.
"""Update substitution definition with name to value.
Args:
name: The string value of substitution name.
Expand All @@ -49,7 +49,7 @@ def substitution_def(name: str, value: str) -> str:
name: The string value of substitution name.
value: The string value of substitution text.
Returns:
Returns substitution text.
Returns substitution definition.
"""
return f'.. |{name}| replace:: {value}'

0 comments on commit f60d1e4

Please sign in to comment.