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

--disallow-any-decorated should not flag @staticmethod #16648

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ikonst
Copy link
Contributor

@ikonst ikonst commented Dec 11, 2023

@staticmethod doesn't transform functions in a way that can sneak in Anys, so we can omit this error in this case.

@ikonst ikonst changed the title --disalllow-any-decorated should not flag @staticmethod --disallow-any-decorated should not flag @staticmethod Dec 11, 2023
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

trio (https://github.com/python-trio/trio)
+ src/trio/_core/_traps.py:27: error: Unused "type: ignore" comment  [unused-ignore]
+ src/trio/_tests/test_util.py:119: error: Unused "type: ignore" comment  [unused-ignore]

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.

1 participant