
If I understand, this is a Pyright bug right ? As implementations should not have typing annotation I believe.
I just played with this again to refresh my memory. Looks like the issue was that the function's implementation was empty and therefore Pyright was warning me that the implementation's return type of `None` was incompatible with the overloads. Once I implemented the implementation the return type annotation was no longer required. So I think there's no issue here. I just didn't read the error closely enough.
Why not have the overload explicitly be applied on each overload ? I feel this would be least ambiguous case. Would there be a drawback to explicitly marking each overload as @dataclass_transform ?
We decided to require `dataclass_transform` to be in only one location because: 1. Allowing a function's overloads to have different transform behaviors (ex. different `dataclass_transform` parameters, or some overloads that transform and some that do not) is an unnecessary complexity. We don't want to require type checkers to support that. 2. It's a maintenance hassle to keep the parameters in sync if the decorator is required on all overloads. -Erik