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
Modernize all Python 3.8 annotations #1815
Conversation
e921de4
to
791b932
Compare
791b932
to
1f0da3e
Compare
Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com>
Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com>
I have to dash, @CasperWA once the tests pass here I will merge and then force update the big migration PR... I have kept a backup at ml-evs/backup-pydantic-v2-orig that we can always go back to, but otherwise I will review the rebased version next week. Thanks again for your help! |
Codecov Report
@@ Coverage Diff @@
## master #1815 +/- ##
==========================================
- Coverage 90.77% 90.68% -0.10%
==========================================
Files 74 74
Lines 4629 4616 -13
==========================================
- Hits 4202 4186 -16
- Misses 427 430 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
I think there are still many more locations where we still import the type definitions. Should these also be changed? |
Do you mean |
Looks like there was an issue with caching. After a reboot, I no longer get any hits when I search for "Tuple". |
* Use Python 3.9 as the 'base' CI version for linting * Update pre-commit hooks * Run `pyupgrade --py39-plus` to upgrade legacy annotations * Add `--exit-non-zero-on-fix` for ruff Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com> * Use f-string over format Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com> --------- Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com>
* Use Python 3.9 as the 'base' CI version for linting * Update pre-commit hooks * Run `pyupgrade --py39-plus` to upgrade legacy annotations * Add `--exit-non-zero-on-fix` for ruff Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com> * Use f-string over format Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com> --------- Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com>
This PR is complementary to #1745. I will first investigate how easy it is to merge the two...
pyupgrade --py39-plus
as a pre-commit hook and run it