Upgrade typehints to 3.10 annotations and remove 3.9 Union and Optional typehints#1324
Open
Vizonex wants to merge 3 commits intoaio-libs:masterfrom
Open
Upgrade typehints to 3.10 annotations and remove 3.9 Union and Optional typehints#1324Vizonex wants to merge 3 commits intoaio-libs:masterfrom
Union and Optional typehints#1324Vizonex wants to merge 3 commits intoaio-libs:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1324 +/- ##
=======================================
Coverage 99.86% 99.86%
=======================================
Files 28 28
Lines 3607 3607
Branches 265 265
=======================================
Hits 3602 3602
Misses 3 3
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
Looks like we are missing pyupgrade on this repo |
Member
Author
@bdraco do you have any ideas of how we should go about doing something like that? I was thinking about implementing a few flags within ruff to get something like that to work. |
3 tasks
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.
What do these changes do?
3.9 was dropped recently so I've chosen to upgrade the annotations away from 3.9 and into 3.10 which includes new the popular pipe syntax instead of
Union[A, B]orOptional[A]in favor ofA | BA | Noneinstead.Are there changes in behavior for the user?
Users will likely enjoy the changes from the new 3.10 annotations over the older
UnionandOptionaltype hints especially since these types are both deprecated.Related issue number
This pull request is related to changes from #1316
Checklist