1. Tarek Ziadé
  2. flake8

Commits

Ian Cordasco  committed d3be6ab

Fixes #58

  • Participants
  • Parent commits d6519dd
  • Branches pyflakes

Comments (0)

Files changed (1)

File flake8/util.py

View file
 
 
 def skip_line(line):
-    return line.strip().lower().endswith('# noqa')
+    def _noqa(line):
+        return line.strip().lower().endswith('# noqa')
+    skip = _noqa(line)
+    if not skip:
+        i = line.rfind(' #')
+        skip = _noqa(line[:i]) if i > 0 else False
+    return skip
 
 
 _NOQA = re.compile(r'flake8[:=]\s*noqa', re.I | re.M)