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
update ellipsis
type
#11564
base: master
Are you sure you want to change the base?
update ellipsis
type
#11564
Conversation
i have no idea what i'm doing lol |
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.
Can you please explain your idea behind this PR? Maybe I can help you 🙂
@@ -184,3 +184,7 @@ else: | |||
@final | |||
class NoneType: | |||
def __bool__(self) -> Literal[False]: ... | |||
|
|||
# Actually the type of Ellipsis is <type 'ellipsis'>, but since it's |
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.
This file is just synced from here: https://github.com/python/typeshed/blob/master/stdlib/_typeshed/__init__.pyi
Manually updating it is not a good practice.
@@ -2160,7 +2160,7 @@ def visit_complex_expr(self, e: ComplexExpr) -> Type: | |||
def visit_ellipsis(self, e: EllipsisExpr) -> Type: | |||
"""Type check '...'.""" | |||
if self.chk.options.python_version[0] >= 3: | |||
return self.named_type('builtins.ellipsis') | |||
return self.named_type('_typeshed.ellipsis') |
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.
We don't use _typeshed.
types in mypy right now. It would be hard to test.
@sobolevn i'm trying to make |
Yes, this is going to be hard 🙂 What I can see here:
|
see #11559 (comment)