Skip to content

@overload functions are counted as module members #1779

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

Closed
vnmabus opened this issue Dec 17, 2020 · 1 comment
Closed

@overload functions are counted as module members #1779

vnmabus opened this issue Dec 17, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@vnmabus
Copy link

vnmabus commented Dec 17, 2020

Bug report

What's wrong

Function prototipes marked with the @overload decorator in the typing module are counted as if they were separate functions to compute WPS202 violations. A previously compliant module can now have this violation merely by adding typing information.

How it should be

@overload functions should not be taken into account, as they must be placed near the original function and do not hinder legibility too much.

@vnmabus vnmabus added the bug Something isn't working label Dec 17, 2020
@sobolevn sobolevn added this to the Version 0.15.x milestone Feb 27, 2021
@sobolevn sobolevn self-assigned this Feb 27, 2021
sobolevn added a commit that referenced this issue Feb 27, 2021

Verified

This commit was signed with the committer’s verified signature.
@sobolevn
Copy link
Member

Thanks, @vnmabus for the suggestion! You have contributed a lot of useful ideas 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants