Skip to content

Conversation

@rchen152
Copy link
Collaborator

@rchen152 rchen152 commented Aug 1, 2025

A few tweaks to the conformance tests that I'm hoping are uncontroversial. Happy to split up this PR if any of these seem like they need more discussion.

  • When a generator is annotated incorrectly, pyright reports errors on both the return type and the yield, while mypy reports an error on just the return type. IMO both of these are reasonable choices, so I suggest we mark the error on the yield as optional.
  • Most of the errors in class_override.py are tagged as allowed to occur on either the @override line or the def line. One error was missing a tag on the def line, which I've added.
  • The dataclass_transform decorator should not be applied to more than one of an overloaded function's overloads and implementation (https://typing.python.org/en/latest/spec/dataclasses.html#specification). dataclasses_transform_func.py applied dataclass_transform to two overloads of the same function, so I removed the decorator from the second overload.

@erictraut
Copy link
Collaborator

LGTM. Thanks @rchen152!

@erictraut erictraut merged commit c141cdf into python:main Aug 2, 2025
4 checks passed
@rchen152 rchen152 deleted the conformance branch August 2, 2025 05:18
facebook-github-bot pushed a commit to facebook/pyrefly that referenced this pull request Aug 3, 2025
Summary: Pulls in python/typing#2061.

Reviewed By: ndmitchell

Differential Revision: D79513775

fbshipit-source-id: 3261fa64f2df1be111576e380487f611e2925fb9
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