-
-
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
Fix typelias invalid-name
false positives for Union variables without assignment.
#8541
Conversation
…ut assignment. Those variables shouldn't be treated as TypeAlias.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
@@ -3,8 +3,8 @@ | |||
|
|||
# Valid | |||
TypeAliasShouldBeLikeThis: TypeAlias = int | |||
_TypeAliasShouldBeLikeThis: Union[str, int] | |||
_TypeAliasShouldBeLikeThis = Union[str, int] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix !
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit 62b9a88 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Looks like the coverage failure is unrelated? |
Yeah! Restarted it, should pass in a couple of minutes! |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8541 +/- ##
=======================================
Coverage 95.90% 95.90%
=======================================
Files 174 174
Lines 18353 18353
=======================================
Hits 17602 17602
Misses 751 751
|
…ut assignment. (#8541) (#8548) (cherry picked from commit cb255ea) Co-authored-by: Yilei "Dolee" Yang <[email protected]>
Those variables shouldn't be treated as TypeAlias.
Type of Changes
Description
Closes #8540