Skip to content

Commit

Permalink
Check should_ignore in if condition and remove function creation
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshks committed Jun 27, 2020
1 parent ecbe065 commit 8fc3fee
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/pip/_internal/operations/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ 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):
# type: (str) -> bool
return False

missing = {}
conflicting = {}
Expand All @@ -76,7 +70,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 8fc3fee

Please sign in to comment.