Attached Documents

Patch to fix the issue (classonlymethod.diff)

Patch to fix the issue (classonlymethod.diff)

This is a diff against changeset 798:51fb69c78868

download
diff -r 51fb69c78868 checkers/typecheck.py
--- a/checkers/typecheck.py	Thu Mar 15 13:48:25 2012 +0100
+++ b/checkers/typecheck.py	Sun Apr 01 17:24:32 2012 +0100
@@ -260,7 +260,7 @@
         elif isinstance(called, astng.UnboundMethod):
             if called.decorators is not None:
                 for d in called.decorators.nodes:
-                    if isinstance(d, astng.Name) and (d.name == 'classmethod'):
+                    if isinstance(d, astng.Name) and (d.name in ('classmethod', 'classonlymethod')):
                         # Class methods have an extra implicit 'cls' argument.
                         num_positional_args += 1
                         break