@typing.no_type_check_decorator is nonfunctional · Issue #6583 · python/mypy (original) (raw)

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