Skip to content

Commit

Permalink
docstring: rename _nest method
Browse files Browse the repository at this point in the history
Currently, the `Docstring` class has a `_nest` member variable for the current nesting level, and a `_nest` method to nest some lines. This commit changes the `_nest` method to `_nest_lines` to avoid duplicate symbols.

Signed-off-by: Stephan Lachnit <[email protected]>
  • Loading branch information
stephanlachnit authored and jnikula committed Nov 19, 2023
1 parent 8d07ace commit 32ab183
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hawkmoth/docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def _remove_comment_markers(lines):
return line_offset

@staticmethod
def _nest(lines, nest):
def _nest_lines(lines, nest):
"""
Indent documentation block for nesting.
Expand All @@ -147,7 +147,7 @@ def get_docstring(self, process_docstring=None):
if process_docstring is not None:
process_docstring(comment_lines)

Docstring._nest(comment_lines, self._indent)
Docstring._nest_lines(comment_lines, self._indent)

# ensure we have cushion blank line before the docstring
if len(header_lines) == 0 or header_lines[0] != '':
Expand All @@ -161,7 +161,7 @@ def get_docstring(self, process_docstring=None):

lines = header_lines + comment_lines

Docstring._nest(lines, self._nest)
Docstring._nest_lines(lines, self._nest)

# ensure we have cushion blank line after the docstring
if lines[-1] != '':
Expand Down

0 comments on commit 32ab183

Please sign in to comment.