Closed erictraut closed 6 months ago
I added a comment to the discussion pleading for a fuller specification for classes. But since three people already signed off on Eric's proposal, and I don't have that much appetite for a prolonged discussion, I'll check the box here.
@hauntsaninja, let me know if you have any other suggestions or concerns. If not, please sign off.
Thanks for pushing this discussion forward. The new words in the spec are strictly better than the status quo.
re no_type_check
for classes: This felt like an interesting place for us to end up, but given that in a decade no type checker and only a handful of users have bothered with it, I'm happy to move on.
I would like to request that the TC consider the adoption of a proposed change to the typing spec regarding the
@no_type_check
decorator.TC Sign-off
Links to PR & Discussions The draft PR can be found here. It incorporates feedback from PR reviews and discussion.
The discussion can be found here.
Impact to type checkers Pyright, pyre and pytype already conform with the proposed specification.
Mypy mostly conforms to the proposed spec but would require a small change. It currently changes the signature of a function decorated with
@no_type_check
toCallable[..., Any]
rather than simply treating the function signature as though it's unannotated.