diff --git a/src/pip/_internal/operations/freeze.py b/src/pip/_internal/operations/freeze.py index 72bbb90c04a..c64bea08062 100644 --- a/src/pip/_internal/operations/freeze.py +++ b/src/pip/_internal/operations/freeze.py @@ -42,8 +42,8 @@ def freeze( requirement=None, # type: Optional[List[str]] find_links=None, # type: Optional[List[str]] - local_only=None, # type: Optional[bool] - user_only=None, # type: Optional[bool] + local_only=False, # type: bool + user_only=False, # type: bool paths=None, # type: Optional[List[str]] isolated=False, # type: bool wheel_cache=None, # type: Optional[WheelCache] @@ -57,12 +57,10 @@ def freeze( yield '-f {}'.format(link) installations = {} # type: Dict[str, FrozenRequirement] - # None is a Falsy value, so pass False if local_only - # and user_only is None for dist in get_installed_distributions( - local_only=local_only if local_only else False, + local_only=local_only, skip=(), - user_only=user_only if user_only else False, + user_only=user_only, paths=paths ): try: