Skip to content

Commit 7b3bace

Browse files
committed
fix: Stop using deprecated ast.Str
1 parent e6debe8 commit 7b3bace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/pytkdocs/parsers/attributes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def get_pairs(nodes: list) -> Iterator[tuple]: # noqa: D103
4747
node1 = nodes[index]
4848
node2 = nodes[index + 1] if index < len(nodes) - 1 else None
4949
if isinstance(node1, (ast.Assign, ast.AnnAssign)):
50-
if isinstance(node2, ast.Expr) and isinstance(node2.value, ast.Str):
50+
if isinstance(node2, ast.Expr) and isinstance(node2.value, ast.Constant):
5151
yield node1, node2.value
5252
index += 2
5353
else:

0 commit comments

Comments
 (0)