-
Notifications
You must be signed in to change notification settings - Fork 308
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
Normalize to module imports #576
Conversation
8e189fc
to
db7a205
Compare
Moving to three-letter unprouncable variable names is actively hostile towards other developers who have to use screen readers. This talk discusses it in the context of Go but it's equally as applicable to Python codebases. |
I can see this was overzealous and posisibly premature (though I don't consider it wasted effort, because it further familiarized me with the codebase).
Not my desire at all. Thanks for the link to the talk; will watch. For what it's worth, I picked it up from test_package.py
🤦♂. Any suggestions on how to keep |
db7a205
to
797da7d
Compare
I don't think it was.
The sole purpose of that file is to use |
Thanks. 😅
Done. Having isort and black in place made this task easier, though it raised a question about how to deal with |
I find the separate lines version easier to read personally |
This reverts commit f91fe38.
Done. |
@pypa/twine-maintainers Any objections to merging this? I'd like to do it this week. Looks like the failing coverage check might be related to removing the conditional around |
5da1ea1
to
d92a826
Compare
Per discussion in #570 and #572 (comment), and as suggested by the Google Style Guide:
Additional changes:
Renamed frequently-used
package
variable topkg
, because this change introduced more instances offrom twine import package
; I sawpkg
used elsewhere in the codeUsed higher-level APIs (e.g.
requests.HTTPError
instead ofrequests.exceptions.HTTPError
,urllib3
instead ofrequests.packages.urllib3
, etc.) when I saw the opportunityRemoved the conditional checks for
hashlib.blake2b
, since that's included in Python 3.6+Left imports from
contextlib
andurllib.parse
alone, because those seem to be accepted conventions.If folks are curious, here's the current results for
from .*import
: from_import.txt.