---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
PLR0202 [*] Class method defined without decorator
  --> no_method_decorator.py:9:5
   |
 7 |         self.color = color
 8 |
 9 |     def pick_colors(cls, *args):  # [no-classmethod-decorator]
   |     ^
10 |         """classmethod to pick fruit colors"""
11 |         cls.COLORS = args
   |
help: Add @classmethod decorator
   |
8  |
9  +     @classmethod
10 |     def pick_colors(cls, *args):  # [no-classmethod-decorator]
11 |         """classmethod to pick fruit colors"""
12 |         cls.COLORS = args
13 |
   -     pick_colors = classmethod(pick_colors)
14 |
   |

PLR0202 [*] Class method defined without decorator
  --> no_method_decorator.py:22:5
   |
21 | class Class:
22 |     def class_method(cls):
   |     ^
23 |         pass
   |
help: Add @classmethod decorator
   |
21 | class Class:
22 +     @classmethod
23 |     def class_method(cls):
24 |         pass
25 |
   -     class_method = classmethod(class_method);another_statement
26 +     another_statement
27 |
   |
