misc(aurora): changed aurora.utilities.utils.get_bool_emoji to use match/case instead of if/else
All checks were successful
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 43s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 29s

This commit is contained in:
Seaswimmer 2024-06-04 00:04:46 -04:00
parent 9b0f977016
commit 1c6d2456ed
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -152,11 +152,13 @@ async def send_evidenceformat(interaction: Interaction, moderation_id: int) -> N
def get_bool_emoji(value: Optional[bool]) -> str: def get_bool_emoji(value: Optional[bool]) -> str:
"""Returns a unicode emoji based on a boolean value.""" """Returns a unicode emoji based on a boolean value."""
if value is True: match value:
return "\N{WHITE HEAVY CHECK MARK}" case True:
if value is False: return "\N{WHITE HEAVY CHECK MARK}"
return "\N{NO ENTRY SIGN}" case False:
return "\N{BLACK QUESTION MARK ORNAMENT}\N{VARIATION SELECTOR-16}" return "\N{NO ENTRY SIGN}"
case _:
return "\N{BLACK QUESTION MARK ORNAMENT}\N{VARIATION SELECTOR-16}"
def get_pagesize_str(value: Union[int, None]) -> str: def get_pagesize_str(value: Union[int, None]) -> str: