| commit | c394c46fc1b21853bc68a7a47c1fe2db828d1dd0 | [log] [tgz] |
|---|---|---|
| author | John Laxson <jl@revealtech.ai> | Thu Mar 16 12:34:27 2023 -0700 |
| committer | GitHub <noreply@github.com> | Thu Mar 16 12:34:27 2023 -0700 |
| tree | ecfb1d67a3690fc0739e80a9c09343262d175270 | |
| parent | 31bc04bf93d555f8a9842c0ba2d3d243c4ac6cd4 [diff] |
fix: Include filename when parsing imports for gazelle (#1133)
diff --git a/gazelle/python/parse.py b/gazelle/python/parse.py index 5cf0b89..6c0ef69 100644 --- a/gazelle/python/parse.py +++ b/gazelle/python/parse.py
@@ -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: