Skip to content

Fix untyped decorator overload error on decorator with __call__ overloads #9232

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

Merged

Conversation

bluetech
Copy link
Contributor

@bluetech bluetech commented Jul 31, 2020

When --disallow-untyped-decorators is used, a callable-class decorator with a overloads on its __call__ implementation would incorrectly issue an "Untyped decorator makes function untyped" error, even when the overloads are typed properly. This has been reported in pytest, which does this: pytest-dev/pytest#7589.

This fixes the problem by expanding on a previous fix in this area, #5509.

@bluetech bluetech changed the title Fix untyped decorator overload error on class decorator with __call__ overloads Fix untyped decorator overload error on decorator with __call__ overloads Jul 31, 2020
Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! Nice and clean.

@JukkaL JukkaL merged commit cc46692 into python:master Jul 31, 2020
udifuchs added a commit to udifuchs/pylint-silent that referenced this pull request Nov 5, 2020
After the merge of:
python/mypy#9232
There is no need to ignore the typing of pytest.fixure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants