Revert "Update pipreqs.py"

This reverts commit 5e37f07016000de91b0c5101ec7b3fb146e08347.
This commit is contained in:
Abraham Long 2021-09-13 11:05:44 -04:00
parent 5e37f07016
commit 3f7bb1eac2

View File

@ -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: