-
Notifications
You must be signed in to change notification settings - Fork 19
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
[SIM907] Use Optional[Type] instead of Union[Type, None] #64
Labels
enhancement
New feature or request
Comments
|
MartinThoma
changed the title
[New Rule] Find Union[Type, None]
[SIM907] Find Union[Type, None]
Feb 27, 2022
MartinThoma
changed the title
[SIM907] Find Union[Type, None]
[SIM907] Use Optional[Type] instead of Union[Type, None]
Feb 27, 2022
MartinThoma
added a commit
that referenced
this issue
Feb 27, 2022
MartinThoma
added a commit
that referenced
this issue
Feb 27, 2022
Note: in 3.10+ PyUpgrade recommends using |
Thank you! I'll try to find a way to disable it for Python 3.10+ :-) (should be possible with sys.version) |
MartinThoma
added a commit
that referenced
this issue
Mar 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Explanation
Sometimes people tend to write
Union[Type, None]
instead ofOptional[Type]
.Example
The text was updated successfully, but these errors were encountered: