-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Blacken src/pip/_internal/network/ #10193
Conversation
Progresses the black formatting of the codebase further.
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.
Not very related but there are a few things I also want to change in the formatted code; f-string instead of str + str, don't use str() in logger call, those kind of things. We can do them in another PR if you want to keep things pure (for e.g. .git-blame-ignore-revs
)
# fmt: off | ||
kr_auth = ( | ||
get_keyring_auth(index_url, username) or | ||
get_keyring_auth(netloc, username) | ||
) | ||
# fmt: on |
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.
What does Black format this to?
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.
Ah dammit. I was explicitly trying to avoid mixing manual changes from automated ones. >.<
Anyway, removing this creates this patch:
diff --git a/src/pip/_internal/network/auth.py b/src/pip/_internal/network/auth.py
index 74d225472..0713f0205 100644
--- a/src/pip/_internal/network/auth.py
+++ b/src/pip/_internal/network/auth.py
@@ -150,12 +150,9 @@ def _get_new_credentials(
# If we don't have a password and keyring is available, use it.
if allow_keyring:
# The index url is more specific than the netloc, so try it first
- # fmt: off
- kr_auth = (
- get_keyring_auth(index_url, username) or
- get_keyring_auth(netloc, username)
+ kr_auth = get_keyring_auth(index_url, username) or get_keyring_auth(
+ netloc, username
)
- # fmt: on
if kr_auth:
logger.debug("Found credentials in keyring for %s", netloc)
return kr_auth
I think that's clearly worse. It's psf/black#2156 upstream.
Yup, I saw them too and; as you said, for follow ups! |
Thanks for the review! ^>^ |
Progresses the black formatting of the codebase further.
Towards #8543