Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c394c46

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

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎gazelle/python/parse.py

Copy file name to clipboardExpand all lines: gazelle/python/parse.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.