Skip to content

Commit

Permalink
Fix isinstance call
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlatr committed Sep 25, 2023
1 parent 4486d2d commit dbc1229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydoctor/astutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dbc1229

Please sign in to comment.