Skip to content

Support @no_type_checks to ignore annotations for a function #557

Closed

Description

@JukkaL

Add a typing.no_type_checks function decorator that skips type checking a function and allows arbitrary annotations for the function. This should be give no errors:

from typing import no_type_checks

@no_type_checks
def foo(x: {'x': 2}, y: 1+2):
    1 + 'x'

See PEP 484 discussion: python/typing#26

Activity

  1. gvanrossum commented on Apr 20, 2015

    @gvanrossum
    Member

    Update: it should be @no_type_check and @no_type_check_decorator as was chosen for the PEP and in some other discussion (can't find the issue right now).

  2. JukkaL commented on May 14, 2015

    @JukkaL
    CollaboratorAuthor

    This was implemented by @spkersten (thanks!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions