-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
*: Automated changes from pyupgrade #3403
Commits on Jun 13, 2024
-
*: Remove redundant (object) base classes
This was only necessary in python 3. This change was made with a version of pyupgrade that was modified to perform only this change.
Configuration menu - View commit details
-
Copy full SHA for 04ebadd - Browse repository at this point
Copy the full SHA 04ebaddView commit details -
*: Use set literals and comprehensions where applicable
These features have been available since Python 2.7. This change was made with a version of pyupgrade modified to perform only this change, then postprocessed with black.
Configuration menu - View commit details
-
Copy full SHA for 50358ac - Browse repository at this point
Copy the full SHA 50358acView commit details -
*: Use dict comprehensions where applicable
Another feature that's been around since Python 2.7 Automated change with modified pyupgrade and black.
Configuration menu - View commit details
-
Copy full SHA for 9f0a7fd - Browse repository at this point
Copy the full SHA 9f0a7fdView commit details -
*: Use OSError instead of its aliases
Various errors were merged into OSError in Python 3.4. Automated change with modified pyupgrade.
Configuration menu - View commit details
-
Copy full SHA for e98b09f - Browse repository at this point
Copy the full SHA e98b09fView commit details -
*: Use default argument for str.encode()
I had missed that this became hard-coded to utf-8 in py3k, instead of being overridable as in python 2. Automated change with modified pyupgrade.
Configuration menu - View commit details
-
Copy full SHA for 6c4d751 - Browse repository at this point
Copy the full SHA 6c4d751View commit details -
wsgi: Avoid deprecated typing.Text alias
This alias existed only for python 2 compatibility. This commit was partially made by pyupgrade and then I manually fixed the unused import.
Configuration menu - View commit details
-
Copy full SHA for ad277a7 - Browse repository at this point
Copy the full SHA ad277a7View commit details -
*: More small pyupgrade cleanups
- Unpack list comprehension - Redundant calls to str() on string literals - Unnecessary args to super() With the previous commits, this brings us up to pyupgrade --py3-plus --keep-percent-format
Configuration menu - View commit details
-
Copy full SHA for 39346ce - Browse repository at this point
Copy the full SHA 39346ceView commit details -
lint: Set black target version to 3.8+
This makes black use trailing commas consistently across the codebase. Without this, it uses certain trailing commas only in files that contain fstrings (because this marks them as requiring Python 3.6+).
Configuration menu - View commit details
-
Copy full SHA for 90ae304 - Browse repository at this point
Copy the full SHA 90ae304View commit details -
*: Switch from percent formatting to f-strings
Automated change using pyupgrade in two passes (once to go from percent formatting to str.format, then to go from str.format to f-strings), followed by black. This left a few uses of str.format for unknown reasons.
Configuration menu - View commit details
-
Copy full SHA for f7818e7 - Browse repository at this point
Copy the full SHA f7818e7View commit details