-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify an interestingly written conditional #7161
Conversation
src/pip/_internal/utils/misc.py
Outdated
@@ -569,8 +569,6 @@ def egg_link_path(dist): | |||
if running_under_virtualenv(): | |||
if virtualenv_no_global(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if virtualenv_no_global(): | |
if not virtualenv_no_global(): |
Both ways do not pass the tests, since either in a yes-global venv or in a no-global venv, nothing is actually appended. if running_under_virtualenv():
sites.append(site_packages)
if not virtualenv_no_global() and user_site:
sites.append(user_site) That way the logic actually matches the description in the docstring and tests pass. |
Sounds like a plan! |
Thanks @kmoza and @deppiedave64! ^>^ |
No description provided.