Skip to content

Commit 02102a9

Browse files
authored
Swap out deprecated ast.Str for ast.Constant (#2514)
This API will be removed in Python 3.14 and is creating noisy deprecation warnings. Signed-off-by: Aron Carroll <[email protected]>
1 parent bf754a6 commit 02102a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/cog/command/call_graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def visit_Call(self, node: ast.Call) -> None:
6565
)
6666
elif node.args:
6767
arg = node.args[0]
68-
if isinstance(arg, ast.Str):
68+
if isinstance(arg, ast.Constant) and isinstance(arg.value, str):
6969
self.includes.append(arg.s)
7070
else:
7171
raise ValueError(

0 commit comments

Comments
 (0)