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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy