-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Third-party stubs: enforce CamelCase for type alias names #8256
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
A lot of aliases are marked as type aliases that I wouldn't consider type aliases. In my opinion as soon as an alias is used at runtime, I wouldn't consider it a type aliases. Examples are |
I agree that these don't need to be type aliases necessarily. @hauntsaninja raised some objections the last time I tried to remove those markers from some of them (#8248 (review)), but I also don't think he has a strong objection (#8248 (review)) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
# Ignore Y026, this isn't a type alias. | ||
# We have to do `ordered_column_set = OrderedSet[_T] | ||
# instead of `ordered_column_set = OrderedSet`, | ||
# or pyright complains |
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.
Why doesn't pyright complain about column_set
?
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.
I have no idea :/
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.
One optional suggestion
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Unblocks PyCQA/flake8-pyi#243