Skip to content

Commit

Permalink
Fix bug in using f-string with attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharsadhwani committed May 16, 2021
1 parent a3b5719 commit 6b003a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zx.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def modify_attr(attr: ast.Attribute) -> None:
if (
isinstance(attr.value, ast.UnaryOp)
and isinstance(attr.value.op, ast.Invert)
and isinstance(attr.value.operand, ast.Constant)
and isinstance(attr.value.operand, (ast.Constant, ast.Str, ast.JoinedStr))
):
attr.value = ast.Call(
func=ast.Name(id='run_shell', ctx=ast.Load()),
Expand Down

0 comments on commit 6b003a8

Please sign in to comment.