Skip to content

Commit

Permalink
Small refactoration removing two avoidable indexer iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
NaelsonDouglas committed May 2, 2021
1 parent 6cdfa21 commit ccc18a6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pipenv/vendor/pipreqs/pipreqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,8 @@ def compare_modules(file_, imports):
specified file.
"""
modules = parse_requirements(file_)

imports = [imports[i]["name"] for i in range(len(imports))]
modules = [modules[i]["name"] for i in range(len(modules))]
imports = [i["name"] for i in imports]
modules = [i["name"] for i in modules]
modules_not_imported = set(modules) - set(imports)

return modules_not_imported
Expand Down

0 comments on commit ccc18a6

Please sign in to comment.