Skip to content

Conversation

@JelleZijlstra
Copy link
Member

Reverts #7454

Fixes#8275

@github-actions

This comment has been minimized.

@srittau
Copy link
Collaborator

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

@JelleZijlstra
Copy link
MemberAuthor

Or better yet, a test case.

Copy link
Member

@AlexWaygoodAlexWaygood 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]]")

@JelleZijlstraJelleZijlstra merged commit 2a7439e into masterJul 12, 2022
@JelleZijlstraJelleZijlstra deleted the revert-7454-master branch July 12, 2022 19:29
Sign up for freeto 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

@JelleZijlstra@srittau@AlexWaygood