Skip to content
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

Maintenance: apply pyupgrade suggestions for py3.9 #11910

Merged
merged 6 commits into from
Feb 14, 2024

Conversation

jayaddison
Copy link
Contributor

Feature or Bugfix

  • Refactoring

Purpose

Detail

  • For application code: find sphinx -name '*.py' -exec pyupgrade --py39 {} \;
  • For the test suite: began by running a similar command, but that resulted in many false positives. The test suite makes use of various pre-py3.9 patterns that we should likely retain support for for a while.

Relates

  • N/A

@jayaddison
Copy link
Contributor Author

Some caution here: it looks like I used the wrong commandline invocation. That should have been:

$ find sphinx -name '*.py' -exec pyupgrade --py39-plus {} \;

The results seem no different, but I'm double-checking it anyway.

@jayaddison jayaddison marked this pull request as draft January 23, 2024 21:04
@jayaddison
Copy link
Contributor Author

Some caution here: it looks like I used the wrong commandline invocation.

In this case, this was a non-issue, thanks to the argparse setting allow_abrev having a default of True - unambiguous long-name flags/options are expanded.

As it turns out, all of the changes here seem acceptable for py3-only too. But I'll keep the pull request description and title as-is, based on the intent.

@jayaddison jayaddison marked this pull request as ready for review January 23, 2024 21:21
@picnixz picnixz merged commit 2fe103a into sphinx-doc:master Feb 14, 2024
21 of 22 checks passed
@picnixz
Copy link
Member

picnixz commented Feb 14, 2024

Thank you !

@jayaddison jayaddison deleted the maintenance/pyupgrade-py39 branch February 14, 2024 10:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
@AA-Turner AA-Turner added this to the 7.3.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants