Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py

changeset 6235
0e6a395ecfe8
parent 6188
5a6ae3be31e6
child 6247
5c677a7f7d51
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py	Thu Apr 12 19:12:36 2018 +0200
+++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py	Fri Apr 13 18:50:57 2018 +0200
@@ -102,6 +102,8 @@
                     comment = comment[:endPos]
             flags = [f.strip() for f in comment.split()
                      if (f.startswith("__") and f.endswith("__"))]
+            flags += [f.strip().lower() for f in comment.split()
+                      if f in ("noqa", "NOQA")]
     return flags
 
 
@@ -331,7 +333,8 @@
                                               flagsLine=True)
             except IndexError:
                 pass
-            if "__IGNORE_WARNING__" not in lineFlags:
+            if "__IGNORE_WARNING__" not in lineFlags and \
+               "noqa" not in lineFlags:
                 results.append((_fn, lineno, col, "", message, msg_args))
     except SyntaxError as err:
         if err.text.strip():

eric ide

mercurial