Fix use of deprecated ast.Str (#4393)
This commit is contained in:
parent
978bc505ac
commit
5e571ccbbe
@ -294,8 +294,8 @@ def _is_ipython_magic(node: ast.expr) -> TypeGuard[ast.Attribute]:
|
||||
def _get_str_args(args: List[ast.expr]) -> List[str]:
|
||||
str_args = []
|
||||
for arg in args:
|
||||
assert isinstance(arg, ast.Str)
|
||||
str_args.append(arg.s)
|
||||
assert isinstance(arg, ast.Constant) and isinstance(arg.value, str)
|
||||
str_args.append(arg.value)
|
||||
return str_args
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user