Plugins/CheckerPlugins/CodeStyleChecker/pep8.py

branch
5_4_x
changeset 3818
2155e837ee74
parent 3817
0f58961a074f
--- a/Plugins/CheckerPlugins/CodeStyleChecker/pep8.py	Sat Sep 27 11:22:39 2014 +0200
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/pep8.py	Sat Sep 27 11:34:38 2014 +0200
@@ -1516,7 +1516,7 @@
             # extended API for eric5 integration
             checker = cls(tree, self.filename, self.options)
             for lineno, offset, code, check, *args in checker.run():
-                if lineno == 0 or not noqa(self.lines[lineno - 1]):
+                if not self.lines or not noqa(self.lines[lineno - 1]):
                     self.report_error_args(lineno, offset, code, check, *args)
 
     def generate_tokens(self):

eric ide

mercurial