mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2026-04-18 06:53:38 +00:00
add empty_if_false to check_mark
patch bump
This commit is contained in:
@@ -8,8 +8,11 @@ def snakecase_to_titlecase(snake_str: str) -> str:
|
||||
return snake_str.replace('_', ' ').title()
|
||||
|
||||
|
||||
def check_mark(value: bool) -> str:
|
||||
def check_mark(value: bool, empty_if_false: bool = False) -> str:
|
||||
"""Return a check mark or cross mark based on the boolean value."""
|
||||
if empty_if_false and not value:
|
||||
return ''
|
||||
|
||||
if os.getenv('NO_COLOR') is not None:
|
||||
return '✓' if value else '✗'
|
||||
return '✅' if value else '❌'
|
||||
|
||||
Reference in New Issue
Block a user