Can I suppress ANN101 for the first arguments ('cls', 'self') of methods? #4542
-
class TestClass:
@classmethod
def print(cls, string: str): # <-- Missing type annotation for `cls` in method Ruff(ANN101)
print(string) Is it possible? |
Beta Was this translation helpful? Give feedback.
Answered by
charliermarsh
May 20, 2023
Replies: 1 comment 2 replies
-
Yup! You can disable the |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
charliermarsh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yup! You can disable the
ANN101
andANN102
rule to turn these off. They're dedicated rules for that reason.