-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Move ellipsis definition to types #11223
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
Diff from mypy_primer, showing the effect of this PR on open source code: prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/server/orchestration/rules.py:102: error: Incompatible types in assignment (expression has type "ellipsis", variable has type "Session | AsyncSession | None") [assignment]
+ src/prefect/server/orchestration/rules.py:102: error: Incompatible types in assignment (expression has type "EllipsisType", variable has type "Session | AsyncSession | None") [assignment]
- src/prefect/server/orchestration/rules.py:103: error: Incompatible types in assignment (expression has type "ellipsis", variable has type "State[Any] | None") [assignment]
+ src/prefect/server/orchestration/rules.py:103: error: Incompatible types in assignment (expression has type "EllipsisType", variable has type "State[Any] | None") [assignment]
- src/prefect/server/orchestration/rules.py:104: error: Incompatible types in assignment (expression has type "ellipsis", variable has type "State[Any] | None") [assignment]
+ src/prefect/server/orchestration/rules.py:104: error: Incompatible types in assignment (expression has type "EllipsisType", variable has type "State[Any] | None") [assignment]
|
|
||
# Backwards compatibility hack for folks who relied on the ellipsis type | ||
# existing in typeshed in Python 3.9 and earlier. | ||
ellipsis = EllipsisType |
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'd favor removing this at some point, but not sure what the fallout would be.
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.
Ah I had a better comment that it looks I forgot to commit. Yeah, agreed. One point in time to remove it is when we drop 3.9 support
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.
For reference, I've added this as a to do item to #13782.
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, this is an improvement.
No description provided.