Commits

Florian Rathgeber  committed 932ee2c

Git and Mercurial hooks respect FLAKE8_IGNORE

  • Participants
  • Parent commits d325cf7

Comments (0)

Files changed (1)

File flake8/hooks.py

 
 COMPLEXITY = os.getenv('FLAKE8_COMPLEXITY', 10)
 STRICT = os.getenv('FLAKE8_STRICT', False)
+IGNORE = os.getenv('FLAKE8_IGNORE')
 
 
 if __name__ == '__main__':
-    sys.exit(git_hook(complexity=COMPLEXITY, strict=STRICT))
+    sys.exit(git_hook(complexity=COMPLEXITY, strict=STRICT, ignore=IGNORE))
 """
 
 
     if not c.has_option('flake8', 'strict'):
         c.set('flake8', 'strict', os.getenv('FLAKE8_STRICT', False))
 
+    if not c.has_option('flake8', 'ignore'):
+        c.set('flake8', 'ignore', os.getenv('FLAKE8_IGNORE'))
+
     c.write(open(path, 'w+'))