Skip to content

Commit

Permalink
Check should_ignore in if condiition
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshks committed Jun 27, 2020
1 parent ecbe065 commit 1da909e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/pip/_internal/operations/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ def check_package_set(package_set, should_ignore=None):
If should_ignore is passed, it should be a callable that takes a
package name and returns a boolean.
"""
if should_ignore:
should_ignore_package = should_ignore
else:
def should_ignore_package(name):
if should_ignore is None:
def should_ignore(name):
# type: (str) -> bool
return False

Expand All @@ -76,7 +74,7 @@ def should_ignore_package(name):
missing_deps = set() # type: Set[Missing]
conflicting_deps = set() # type: Set[Conflicting]

if should_ignore_package(package_name):
if should_ignore and should_ignore(package_name):
continue

for req in package_set[package_name].requires:
Expand Down

0 comments on commit 1da909e

Please sign in to comment.