Skip to content

Commit

Permalink
fix: read booleans from setup.cfg and pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed Oct 26, 2024
1 parent b94fbc4 commit de58b19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mutmut/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,8 @@ def s(key, default):
return default
if isinstance(default, list):
result = [x for x in result.split("\n") if x]
elif isinstance(default,bool):
result = result.lower() in ('1', 't', 'true')
elif isinstance(default, int):
result = int(result)
return result
Expand All @@ -1007,7 +1009,7 @@ def read_config():
Path('tests.py'),
],
max_stack_depth=s('max_stack_depth', -1),
debug=s('debug', 'False').lower() in ('1', 't', 'true'),
debug=s('debug', False),
)


Expand Down

0 comments on commit de58b19

Please sign in to comment.