Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR applies pyupgrade-style modernizations intended for Python 3.9+ (per #597), primarily replacing older string formatting and updating type annotations/imports to more modern equivalents.
Changes:
- Replace
str.format(...)/%formatting with f-strings across tests and packaging code. - Simplify typing usage in
environ/environ.pyby removing unusedtypingimports and using built-in collection types in return annotations. - Remove redundant Python 3 unicode literal prefixes (
u"...") in Sphinx configuration.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_search.py |
Converts URL construction/assertions to f-strings for readability and py39+ style. |
tests/test_path.py |
Updates Windows-path string expectations to f-strings. |
tests/test_cache.py |
Converts cache URL test strings to f-strings while preserving test intent. |
setup.py |
Modernizes error formatting and regex construction via f-strings / raw f-strings. |
environ/environ.py |
Removes unused typing imports and updates return annotations to built-in types. |
docs/conf.py |
Removes unnecessary u"" prefixes from string literals. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4ec7a93 to
6c437ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add pyupgrade to git hooks and apply related fixes.
Resolves #597