Split UP007 Union and Optional to two individual rules#11379
Closed
blueraft wants to merge 2 commits intoastral-sh:mainfrom
Closed
Split UP007 Union and Optional to two individual rules#11379blueraft wants to merge 2 commits intoastral-sh:mainfrom
blueraft wants to merge 2 commits intoastral-sh:mainfrom
Conversation
Contributor
VascoSch92
reviewed
May 12, 2024
| @@ -0,0 +1,41 @@ | |||
| import typing | |||
Contributor
There was a problem hiding this comment.
Can I suggest a test case of the form List[Optional[str, int]] ?
To be sure the rule detect also nested Optional. Or it is already the case? :)
Contributor
Author
There was a problem hiding this comment.
Thanks for the suggestion, I've added a test case for nested Optional. A test case for nested Union was already there, so I didn't modify that.
|
any progress? |
Contributor
|
Do you intend to continue the work on this PR soon? If not, I can take it over. |
Contributor
Author
|
@InSyncWithFoo Feel free to take over, thanks! |
Member
|
Closing, because we merged #15313 |
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.
Resolves #4858
Summary
Drop Optional support from UP007 in preview mode
Add new rule in preview for use of Optional
Add documentation about the transition to both rules -> I have added some documentation regarding this to the
rustdoc, @zanieb do you want me to add this somewhere else too?Test Plan
cargo test