Commits

trbs  committed 4512c4a

add ignore option to hg_hook

  • Participants
  • Parent commits 106b15a

Comments (0)

Files changed (1)

File flake8/run.py

 def hg_hook(ui, repo, **kwargs):
     _initpep8()
     complexity = ui.config('flake8', 'complexity', default=-1)
+    ignore = ui.config('flake8', 'ignore', default="").split(',')
+    if ignore:
+        pep8style.options.ignore = ignore
     warnings = 0
 
     for file_ in _get_files(repo, **kwargs):
-        warnings += check_file(file_, complexity)
+        warnings += check_file(file_, ignore=ignore, complexity=complexity)
 
     strict = ui.configbool('flake8', 'strict', default=True)