Skip to content

Conversation

@JelleZijlstra
Copy link
Member

Reverts #7454

Fixes #8275

@github-actions

This comment has been minimized.

@srittau
Copy link
Collaborator

srittau commented Jul 12, 2022

Maybe add a comment so we don't accidentally add it back?

@JelleZijlstra
Copy link
Member Author

Or better yet, a test case.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the variadic-tuple-subclass case included as a test-case here much more clearly problematic than the specialised-tuple-subclass case discussed in the issue. Looks good.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

discord.py (https://github.com/Rapptz/discord.py)
+ discord/guild.py:545: error: Need type annotation for "empty_tuple"
- discord/ext/tasks/__init__.py:494: error: Incompatible types in assignment (expression has type "Tuple[]", variable has type "Tuple[Type[OSError], Type[GatewayNotFound], Type[ConnectionClosed], Type[ClientError], Type[TimeoutError]]")
+ discord/ext/tasks/__init__.py:494: error: Incompatible types in assignment (expression has type "Tuple[<nothing>, ...]", variable has type "Tuple[Type[OSError], Type[GatewayNotFound], Type[ConnectionClosed], Type[ClientError], Type[TimeoutError]]")

@JelleZijlstra JelleZijlstra merged commit 2a7439e into master Jul 12, 2022
@JelleZijlstra JelleZijlstra deleted the revert-7454-master branch July 12, 2022 19:29
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.

Recent change to tuple constructor breaks subclasses of tuples

4 participants