Sat, 27 Sep 2014 11:34:38 +0200
Redid the last fix.
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sat Sep 27 11:22:39 2014 +0200 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sat Sep 27 11:34:38 2014 +0200 @@ -475,8 +475,9 @@ fname, lineno, position, text = error if lineno > len(source): lineno = len(source) - if lineno == 0 or "__IGNORE_WARNING__" not in \ - Utilities.extractLineFlags( + if source and \ + "__IGNORE_WARNING__" not in \ + Utilities.extractLineFlags( source[lineno - 1].strip()): self.noResults = False if fixer:
--- 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):