Skip to content

Commit c394c46

Browse files
authored
fix: Include filename when parsing imports for gazelle (bazel-contrib#1133)
1 parent 31bc04b commit c394c46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gazelle/python/parse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
def parse_import_statements(content, filepath):
2929
modules = list()
30-
tree = ast.parse(content)
30+
tree = ast.parse(content, filename=filepath)
3131
for node in ast.walk(tree):
3232
if isinstance(node, ast.Import):
3333
for subnode in node.names:

0 commit comments

Comments
 (0)