Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Deprecate typing.no_type_check_decorator #106309

Copy link
Copy link
Closed
@AlexWaygood

Description

@AlexWaygood
Issue body actions

Feature or enhancement

We should deprecate typing.no_type_check_decorator, with a view to removing it in Python 3.15.

Pitch

The typing documentation describes typing.no_type_check_decorator like this:

Decorator to give another decorator the no_type_check() effect.

This wraps the decorator with something that wraps the decorated function in no_type_check().

In 2023, this is frankly misleading for users of the typing module. Unlike its twin @no_type_check, no major type checker has yet added support for no_type_check_decorator, despite the fact that it was added to the typing module in Python 3.5. If it's been 8 years and it still hasn't had support added by any major type checker, it's unlikely to ever be usable or useful. Meanwhile, the decorator is fairly obscure, and you can achieve the same effect using other tools such as @typing.no_type_check and typing.Annotated. There have been a few feature requests to type checkers over the years asking them to add support, but none of them have a significant number of upvotes.

We should simply deprecate @no_type_check_decorator, with a view to removing it in Python 3.15. (Note that I do not propose deprecating @no_type_check, which is supported by mypy and reasonably popular among mypy users.)

Previous discussion

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.