Skip to content

Commit be0e4e6

Browse files
committed
fix: read booleans from setup.cfg and pyproject.toml
1 parent b94fbc4 commit be0e4e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mutmut/__main__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,8 @@ def s(key, default):
988988
result = [x for x in result.split("\n") if x]
989989
elif isinstance(default, int):
990990
result = int(result)
991+
elif isinstance(default,bool):
992+
result = result.lower() in ('1', 't', 'true')
991993
return result
992994
return s
993995

@@ -1007,7 +1009,7 @@ def read_config():
10071009
Path('tests.py'),
10081010
],
10091011
max_stack_depth=s('max_stack_depth', -1),
1010-
debug=s('debug', 'False').lower() in ('1', 't', 'true'),
1012+
debug=s('debug', False),
10111013
)
10121014

10131015

0 commit comments

Comments
 (0)