mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-29 10:36:53 +00:00
use mercurial's ui.configbool API to retrieve booleans
This commit is contained in:
parent
12ee40f481
commit
13d0efd6d7
2 changed files with 3 additions and 4 deletions
|
|
@ -3,4 +3,5 @@ Project created by Tarek Ziadé.
|
|||
Contributors:
|
||||
|
||||
- Tamás Gulácsi
|
||||
- Nicolas Dumazet
|
||||
|
||||
|
|
|
|||
|
|
@ -70,11 +70,9 @@ def hg_hook(ui, repo, **kwargs):
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue