Skip to content

@typing.no_type_check_decorator is nonfunctional #6583

Closed as not planned
Closed as not planned
@lunixbochs

Description

@lunixbochs
from typing import no_type_check, no_type_check_decorator

@no_type_check_decorator
def test(fn):
    return fn

@test
def blah(x: {'x': 1}):
    pass

@no_type_check
def blah2(x: {'x': 1}):
    pass
$ mypy notypecheck.py 
notypecheck.py:1: error: Module 'typing' has no attribute 'no_type_check_decorator'
notypecheck.py:8: error: Invalid type comment or annotation

I think this firstly needs a typeshed stub, but I think it won't work without special case support in mypy as well.

Related: python/typeshed#2884

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions