mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 12:32:33 +01:00
Make beets.util.str2bool more idiomatic
This commit is contained in:
parent
4ef52e6265
commit
fd2c57f736
1 changed files with 1 additions and 4 deletions
|
|
@ -544,10 +544,7 @@ def truncate_path(path, length=MAX_FILENAME_LENGTH):
|
|||
|
||||
def str2bool(value):
|
||||
"""Returns a boolean reflecting a human-entered string."""
|
||||
if value.lower() in ('yes', '1', 'true', 't', 'y'):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return value.lower() in ('yes', '1', 'true', 't', 'y')
|
||||
|
||||
|
||||
def as_string(value):
|
||||
|
|
|
|||
Loading…
Reference in a new issue