Closed alexanderlobov closed 10 months ago
Then that's a problem with Pyre, no?
Otherwise, how are you supposed to make a TypeVar with a bound set to a Dataclass
protocol?
I do want to keep the bound of Dataclass
, otherwise any non-dataclass type could be passed.
Thanks for the answer! Sounds reasonable. I'll discuss it with the pyre team.
Closing this for now, since the DataclassInstance
protocol from dataclasses
is also following this structure.
Describe the bug
To Reproduce
Expected behavior No errors are expected from
pyre
.Actual behavior
Desktop (please complete the following information):
Additional context
The same happens for
ArgumentParser.add_arguments
:The reason may be that a private method is used in the
Dataclass
declaration:That is prohibited in pyre: https://pyre-check.org/docs/errors/#52-private-protocol-property