8000 Don't crash when encountering an ast.BinOp node. · python-formate/flake8-encodings@a075ddf · GitHub
[go: up one dir, main page]

Skip to content

Commit a075ddf

Browse files
committed
Don't crash when encountering an ast.BinOp node.
1 parent 95e6139 commit a075ddf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flake8_encodings/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,11 @@ def visit_Call(self, node: ast.Call): # noqa: D102
220220
# Attribute on a string
221221
return self.generic_visit(node)
222222

223+
elif isinstance(node.func.value, ast.BinOp): # pragma: no cover
224+
# TODO
225+
# Expressions such as (tmp_pathplus / "code.py").write_text(example_source)
226+
return self.generic_visit(node)
227+
223228
elif self.filename.as_posix() == "<unknown>":
224229
# no jedi source (run with .visit() or from memory)
225230
return self.generic_visit(node)

0 commit comments

Comments
 (0)
0