SeaCogs/aurora/configuration/utils.py
SeaswimmerTheFsh a373f63756
Some checks failed
Actions / Lint Code (Pylint) (pull_request) Failing after 15s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 11s
fix(aurora): fixed TypeError in embed _overrides function
2024-01-15 07:07:06 +00:00

16 lines
595 B
Python

from typing import Union
def get_bool_emoji(value: bool) -> str:
"""Returns a unicode emoji based on a boolean value."""
if value is True:
return "\N{WHITE HEAVY CHECK MARK}"
if value is False:
return "\N{NO ENTRY SIGN}"
if value is None:
return "\N{BLACK QUESTION MARK ORNAMENT}\N{VARIATION SELECTOR-16}"
def get_pagesize_str(value: Union[int, None]) -> str:
"""Returns a string based on a pagesize value."""
if value is None:
return "\N{BLACK QUESTION MARK ORNAMENT}\N{VARIATION SELECTOR-16}"
return str(value) + " cases per page"