Commits

Florian Rathgeber  committed 9779f38

Git and Mercurial hooks respect FLAKE8_LAZY

  • Participants
  • Parent commits 932ee2c

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')
+LAZY = os.getenv('FLAKE8_LAZY', False)
 
 
 if __name__ == '__main__':
-    sys.exit(git_hook(complexity=COMPLEXITY, strict=STRICT, ignore=IGNORE))
+    sys.exit(git_hook(
+        complexity=COMPLEXITY,
+        strict=STRICT,
+        ignore=IGNORE,
+        lazy=LAZY,
+        ))
 """
 
 
     if not c.has_option('flake8', 'ignore'):
         c.set('flake8', 'ignore', os.getenv('FLAKE8_IGNORE'))
 
+    if not c.has_option('flake8', 'lazy'):
+        c.set('flake8', 'lazy', os.getenv('FLAKE8_LAZY', False))
+
     c.write(open(path, 'w+'))