Skip to content

Commit

Permalink
fix docstring check
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed May 3, 2024
1 parent 2e6fbe7 commit 04db590
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vyper/ast/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ def _visit_docstring(self, node):

if node.body:
n = node.body[0]
if isinstance(n, python_ast.Expr) and isinstance(n.value, python_ast.Str):
if (
isinstance(n, python_ast.Expr)
and isinstance(n.value, python_ast.Constant)
and isinstance(n.value.value, str)
):
self.generic_visit(n.value)
n.value.ast_type = "DocStr"
del node.body[0]
Expand Down

0 comments on commit 04db590

Please sign in to comment.