Skip to content

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

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

hauntsaninja
Copy link
Collaborator

No description provided.

Copy link
Contributor

github-actions bot commented Jan 2, 2024

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
Copy link
Member

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.

Copy link
Collaborator Author

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

Copy link
Collaborator

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.

Copy link
Member

@JelleZijlstra JelleZijlstra left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants