Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support @no_type_checks to ignore annotations for a function #557

Closed
JukkaL opened this issue Jan 17, 2015 · 2 comments
Closed

Support @no_type_checks to ignore annotations for a function #557

JukkaL opened this issue Jan 17, 2015 · 2 comments

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Jan 17, 2015

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

@gvanrossum
Copy link
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).

@JukkaL
Copy link
Collaborator Author

JukkaL commented May 14, 2015

This was implemented by @spkersten (thanks!).

@JukkaL JukkaL closed this as completed May 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants