mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
Revert "Update pipreqs.py"
This reverts commit 5e37f07016000de91b0c5101ec7b3fb146e08347.
This commit is contained in:
parent
5e37f07016
commit
3f7bb1eac2
@ -114,7 +114,7 @@ def get_all_imports(
|
||||
with open(file_name, "r", encoding=encoding) as f:
|
||||
contents = f.read()
|
||||
try:
|
||||
tree = ast.parse(contents, filename=file_name)
|
||||
tree = ast.parse(contents)
|
||||
for node in ast.walk(tree):
|
||||
if isinstance(node, ast.Import):
|
||||
for subnode in node.names:
|
||||
|
Loading…
x
Reference in New Issue
Block a user