From dbc1229dbf3de7927e2c995a9f3ae0abb71405a3 Mon Sep 17 00:00:00 2001 From: tristanlatr Date: Sun, 24 Sep 2023 23:06:51 -0400 Subject: [PATCH] Fix isinstance call --- pydoctor/astutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydoctor/astutils.py b/pydoctor/astutils.py index 87beb70ab..b70e86276 100644 --- a/pydoctor/astutils.py +++ b/pydoctor/astutils.py @@ -395,7 +395,7 @@ def extract_docstring_linenum(node: ast.Constant | ast.Str) -> int: return the line number of the first non-blank line. """ # TODO: remove me when python3.7 is not supported - doc = str(node.value) if isinstance(ast.Constant) else node.s + doc = str(node.value) if isinstance(node, ast.Constant) else node.s lineno = node.lineno if _string_lineno_is_end: # In older CPython versions, the AST only tells us the end line