Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Deprecate typing.no_type_check_decorator #106309

Closed
Labels
@AlexWaygood

Description

@AlexWaygood

Feature or enhancement

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

Pitch

The typing documentation describestyping.no_type_check_decorator like this:

Decorator to give another decorator theno_type_check() effect.

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

In 2023, this is frankly misleading for users of thetyping module. Unlike its twin@no_type_check, no major type checker has yet added support forno_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 andtyping.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 Ido 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


      [8]ページ先頭

      ©2009-2025 Movatter.jp