From 04db59069515e8aac8bb9cf4459376fcbc338834 Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Fri, 3 May 2024 18:02:25 +0800 Subject: [PATCH] fix docstring check --- vyper/ast/parse.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vyper/ast/parse.py b/vyper/ast/parse.py index 690f88d3b5..3aaa2879e1 100644 --- a/vyper/ast/parse.py +++ b/vyper/ast/parse.py @@ -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]