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 ac196cd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pip/_internal/operations/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ def check_package_set(package_set, should_ignore=None):
package name and returns a boolean.
"""
if should_ignore:
should_ignore_package = should_ignore
else:
def should_ignore_package(name):
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 ac196cd

Please sign in to comment.