generated from MinBZK/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update beslisboom to version v1.2.0 (#413)
- Loading branch information
Showing
29 changed files
with
338 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from collections.abc import Callable | ||
|
||
from fastapi import Request | ||
|
||
from ..schema.localized_value_item import LocalizedValueItem | ||
from .localizable import LocalizableEnum, get_localized_enum, get_localized_enums | ||
|
||
|
||
class RiskGroup(LocalizableEnum): | ||
HOOG_RISICO_AI = "hoog-risico AI" | ||
GEEN_HOOG_RISICO_AI = "geen hoog-risico AI" | ||
VERBODEN_AI = "verboden AI" | ||
UITZONDERING_VAN_TOEPASSING = "uitzondering van toepassing" | ||
NIET_VAN_TOEPASSING = "niet van toepassing" | ||
|
||
@classmethod | ||
def get_display_values(cls: type["RiskGroup"], _: Callable[[str], str]) -> dict["RiskGroup", str]: | ||
return { | ||
cls.HOOG_RISICO_AI: _("hoog-risico AI"), | ||
cls.GEEN_HOOG_RISICO_AI: _("geen hoog-risico AI"), | ||
cls.VERBODEN_AI: _("verboden AI"), | ||
cls.UITZONDERING_VAN_TOEPASSING: _("uitzondering van toepassing"), | ||
cls.NIET_VAN_TOEPASSING: _("niet van toepassing"), | ||
} | ||
|
||
|
||
def get_localized_risk_group(key: RiskGroup | None, request: Request) -> LocalizedValueItem | None: | ||
return get_localized_enum(key, request) | ||
|
||
|
||
def get_localized_risk_groups(request: Request) -> list[LocalizedValueItem | None]: | ||
return get_localized_enums(RiskGroup, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.