Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Nov 10, 2024
1 parent 234638d commit fc2aecd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nbqa/handle_magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def _get_node_args(func: ast.Call) -> List[str]:
"""
args = []
for arg in func.args:
if isinstance(arg, ast.Str):
args.append(arg.s)
if isinstance(arg, ast.Constant):
args.append(arg.value)
else:
raise AssertionError(
"Please report a bug at https://github.com/nbQA-dev/nbQA/issues"
Expand Down Expand Up @@ -158,8 +158,8 @@ def visit_Call(self, node: ast.Call) -> None:
if node.func.attr == "run_cell_magic":
args = []
for arg in node.args:
if isinstance(arg, ast.Str):
args.append(arg.s)
if isinstance(arg, ast.Constant):
args.append(arg.value)
else:
raise AssertionError(
"Please report a bug at https://github.com/nbQA-dev/nbQA/issues"
Expand Down

0 comments on commit fc2aecd

Please sign in to comment.