Skip to content

Conversation

@ulgens
Copy link
Contributor

@ulgens ulgens commented Nov 23, 2025

Change Summary

Enables pyupgrade rule set in ruff config.

https://docs.astral.sh/ruff/rules/#pyupgrade-up
https://github.com/asottile/pyupgrade

A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.

Helps to keep the code modern.

Depends on:

PR Checklist

@ulgens ulgens marked this pull request as draft November 23, 2025 19:44
@tharropoulos
Copy link
Contributor

The reason for most of the changes here was that this package supported versions of 3.9 onwards.

There are numerous changes that rely on PEP 695 (type keyword) as well as a number of union changes that use the pipe symbol.

The pipe ones should be fine as long as we deprecate 3.9 usage.

@tharropoulos
Copy link
Contributor

Inheriting from object should be left out, that's for sure

@ulgens
Copy link
Contributor Author

ulgens commented Nov 24, 2025

The reason for most of the changes here was that this package supported versions of 3.9 onwards.

To clarify, that's the reason for all of the changes. Excluding the trove update commit (I will rebase the branch when #111 is merged), the only changes are ruff config update to enable pyupgrade and fixes applied by pyupgrade.

@tharropoulos
Copy link
Contributor

Wasn't type introduced in 3.12 though?

@ulgens
Copy link
Contributor Author

ulgens commented Nov 24, 2025

@tharropoulos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants