Skip to content

Commit

Permalink
revert formatting mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando-crz committed Oct 30, 2023
1 parent bad810a commit 859b97e
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions pipreqs/pipreqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,17 +539,14 @@ def init(args):
# the list of exported modules, installed locally
# and the package name is not in the list of local module names
# it add to difference
difference = [
x
for x in candidates
if
# aggregate all export lists into one
# flatten the list
# check if candidate is in exports
x.lower() not in [y for x in local for y in x["exports"]] and
# check if candidate is package names
x.lower() not in [x["name"] for x in local]
]
difference = [x for x in candidates if
# aggregate all export lists into one
# flatten the list
# check if candidate is in exports
x.lower() not in [y for x in local for y in x['exports']]
and
# check if candidate is package names
x.lower() not in [x['name'] for x in local]]

imports = local + get_imports_info(difference, proxy=proxy, pypi_server=pypi_server)
# sort imports based on lowercase name of package, similar to `pip freeze`.
Expand Down

0 comments on commit 859b97e

Please sign in to comment.