Skip to content

no_type_check_decorator doesn't work #1452

@jgarvin

Description

@jgarvin

The no_type_check_decorator is supposed to let you give the effect of no_type_check to other decorators. pytype doesn't appear to understand it:

from typing import no_type_check_decorator

@no_type_check_decorator
def test(cls):
    return cls

@test
class Foo:
    x: 5

Gives:

File "/tmp/type_test3.py", line 15, in Foo: Invalid type annotation '5' for x [invalid-annotation]
  Not a type

mypy is also currently lacking support, they discuss it probably needing special case support directly in the checker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions