Skip to content

Commit

Permalink
[91] Handle invalid SplitCharacteristics in custom card types
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinHeist committed Sep 20, 2024
1 parent 219fd96 commit 982b98b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion modules/BaseCardType.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,13 @@ def __init_subclass__(cls, **kwargs) -> None:
f'object'
)

SplitCharacteristics(**cls.TITLE_CHARACTERISTICS)
try:
SplitCharacteristics(**cls.TITLE_CHARACTERISTICS) # type: ignore
except Exception:
raise TypeError(
f'{cls.__name__}.TITLE_CHARACTERISTICS must be a '
f'SplitCharacteristics dictionary.'
)

if not isinstance(cls.ARCHIVE_NAME, str):
raise TypeError(f'{cls.__name__}.ARCHIVE_NAME must be a string')
Expand Down
2 changes: 1 addition & 1 deletion modules/ref/version_webui
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0-alpha.12.0-webui90
v2.0-alpha.12.0-webui91

0 comments on commit 982b98b

Please sign in to comment.