-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Pyupgrade + flynt + f-strings #1759
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1759 +/- ##
==========================================
- Coverage 90.89% 90.87% -0.02%
==========================================
Files 59 59
Lines 14229 14232 +3
==========================================
+ Hits 12933 12934 +1
- Misses 1296 1298 +2
Continue to review full report at Codecov.
|
Wow @akx thanks for introducing me to flynt. What do you think of modifying the commit hooks / tox linters call so that we fail immediately if there are any code chnages? You'd have to add this to dev_requirements.txt but this way we could catch PRs that violate this in the future. WYDT? |
Sure thing @chayim! Added that configuration in e9008bc. |
@akx didn't pass unfortunately. @WisdomPill I'd like to merge this, then yours - only since yours is pure autogen on top. I am feel guilty about pushing you again - please don't hate me! I think these are both great contributions and will be very thankful when they land. |
@chayim Ah, I forgot that I also agree that this should probably be merged first, since there were a bunch of hand-rolled fixes in the 3rd commit. |
No problem, just let me know when this gets merged so I can rebase on top of it |
❤️ to everyone here. This is a beautiful thing. @WisdomPill by the time you receive this, it'll now be in. Hopefully (as in 30 minutes from now) master will also be versioned as 4.1.0rc2 so that we can close this off. Yours is the next merge in. |
Pull Request check-list
Please make sure to review and check all of these items:
$ tox
pass with this change (including linting)?Description of change
Since redis-py is Python 3.6+, this PR runs
pyupgrade
andflynt
, followed by some manual edits, to turn all%
and (almost all).format()
invocations to f-strings instead.pyupgrade
also does a couple other things such as fixes upsuper()
calls and refactors things to use dict comprehensions, etc.This is tangentially related to #1734 (so heads-up @WisdomPill 😄). Since
black
's code style prescribes a max-line-length of 88, I've (temporarily) adjusted theflake8
invocation in CI for that.