Activity system #3
@ -1,5 +1,5 @@
|
|||||||
from enum import StrEnum
|
from enum import StrEnum
|
||||||
from typing import Literal
|
from typing import Literal, get_args
|
||||||
|
|
||||||
'''
|
'''
|
||||||
This category is used to differentiate types of form elements
|
This category is used to differentiate types of form elements
|
||||||
@ -17,3 +17,6 @@ FormTextCategory = Literal[
|
|||||||
FormElementCategory.text_piece,
|
FormElementCategory.text_piece,
|
||||||
FormElementCategory.title_text
|
FormElementCategory.title_text
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def is_question_category(category: FormElementCategory) -> bool:
|
||||||
|
return category in get_args(FormQuestionCategory)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user