Commits

Nicolas Dumazet  committed 3353c04

use mercurial's ui.configbool API to retrieve booleans

  • Participants
  • Parent commits 822bb5d

Comments (0)

Files changed (2)

File CONTRIBUTORS.txt

 Contributors:
 
 - Tamás Gulácsi
+- Nicolas Dumazet
 

File flake8/run.py

     for file_ in _get_files(repo, **kwargs):
         warnings += check_file(file_)
 
-    strict = ui.config('flake8', 'strict')
-    if strict is None:
-        strict = True
+    strict = ui.configbool('flake8', 'strict', default=True)
 
-    if strict.lower() in ('1', 'true'):
+    if strict:
         return warnings
 
     return 0