Skip to content

Commit

Permalink
fix: Include filename when parsing imports for gazelle (#1133)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaxson committed Mar 16, 2023
1 parent 31bc04b commit c394c46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gazelle/python/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

def parse_import_statements(content, filepath):
modules = list()
tree = ast.parse(content)
tree = ast.parse(content, filename=filepath)
for node in ast.walk(tree):
if isinstance(node, ast.Import):
for subnode in node.names:
Expand Down

0 comments on commit c394c46

Please sign in to comment.