Skip to content

Commit

Permalink
Stop using deprecated doc attribute. Replace it with doc_node
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Nov 6, 2023
1 parent acc19df commit 269fb16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kiwi_lint/docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def visit_functiondef(self, node):

@utils.only_required_for_messages("use-triple-double-quotes")
def _check_docstring(self, node):
if node.doc in self._string_tokens:
token = self._string_tokens[node.doc]
if node.doc_node and node.doc_node.value in self._string_tokens:
token = self._string_tokens[node.doc_node.value]
if not token.startswith('"""'):
self.add_message("use-triple-double-quotes", node=node)
2 changes: 1 addition & 1 deletion kiwi_lint/similar_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def check_similar_and_add_error_message(

if similar_string:
if isinstance(node, str):
error_message["node"] = astroid.Module(node, file=node, doc=None)
error_message["node"] = astroid.Module(node, file=node)
else:
error_message["node"] = node
error_message["args"] = (
Expand Down

0 comments on commit 269fb16

Please sign in to comment.