Ian George  committed 139d972 Draft

Added the django classonlymethod decorator to checkers.typecheck to suppress E1120 warning for class-based views

  • Participants
  • Parent commits 79f6283

Comments (0)

Files changed (1)

File pylint/checkers/

         elif isinstance(called, astng.UnboundMethod):
             if called.decorators is not None:
                 for d in called.decorators.nodes:
-                    if isinstance(d, astng.Name) and ( == 'classmethod'):
+                    if isinstance(d, astng.Name) and (
+                   in ['classmethod', 'classonlymethod']):
                         # Class methods have an extra implicit 'cls' argument.
                         num_positional_args += 1