Plugins/CheckerPlugins/Pep8/Pep257Checker.py

changeset 2944
dcca9f5c701d
parent 2937
de26bc76d6ee
child 2945
0005e6314aea
diff -r e9348df06994 -r dcca9f5c701d Plugins/CheckerPlugins/Pep8/Pep257Checker.py
--- a/Plugins/CheckerPlugins/Pep8/Pep257Checker.py	Fri Sep 27 19:08:31 2013 +0200
+++ b/Plugins/CheckerPlugins/Pep8/Pep257Checker.py	Sat Sep 28 14:03:37 2013 +0200
@@ -1010,7 +1010,7 @@
                 not contextLines[cti].strip().endswith(('"""', "'''")):
             cti += 1
         end = cti
-        if cti == len(contextLines):
+        if cti >= len(contextLines) - 1:
             return
         
         if contextLines[start - 1].strip():
@@ -1156,7 +1156,7 @@
                 kwargs = []
                 for line in docstringContext.source():
                     if line.strip().startswith(("@param", "@keyparam")):
-                        at, name, _ = line.strip().split(None, 2)
+                        at, name = line.strip().split(None, 2)[:2]
                         if at == "@keyparam":
                             kwargs.append(name)
                         args.append(name)
@@ -1222,7 +1222,7 @@
                 not contextLines[cti].strip().endswith(('"""', "'''")):
             cti += 1
         end = cti
-        if cti == len(contextLines):
+        if cti >= len(contextLines) - 1:
             return
         
         if isClassContext:

eric ide

mercurial