-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Enforce modern annotations syntax #4368
Conversation
Perhaps bump ruff version to 0.4.4: setuptools/.pre-commit-config.yaml Lines 2 to 3 in 4dc0c31
|
Is pre-commit.ci even enabled in this project? It'd be nice to for autofixes on PRs (including lint fixes which that config is missing). either way yeah, let's bump Ruff too |
You-re right, pre-commit does not seem to be used by CI jobs, instead something (tox?) calls pytest-ruff. Conflicts must be resolved. |
9347680
to
d34d207
Compare
97e722e
to
1db072e
Compare
Runtime type aliases can't use |
|
Thank you! |
Summary of changes
Relates to #2345 (comment) , as more type hints and annotations are added. Using a modern annotations syntax is preferable, reduces extraneous typing imports and allows more type subscriptions.
I've merged the
ignore
andextend-ignore
ignore entries in Ruff becauseextend-ignore
is obsolete https://docs.astral.sh/ruff/settings/#lint_extend-ignoreBumped ruff in pre-commit to latest.
Bumped pytest-ruff to latest (https://github.com/businho/pytest-ruff/releases/tag/v0.3.2 should have a much cleaner error output now)
Edit: I keep forgetting this comes from the skeleton, I opened jaraco/skeleton#126
Pull Request Checklist
newsfragments/
. (no user-facing changes)(See documentation for details)