Added function which ckecs if a form category is a question
This commit is contained in:
parent
c0e592e973
commit
0c1683c74b
@ -1,5 +1,5 @@
|
||||
from enum import StrEnum
|
||||
from typing import Literal
|
||||
from typing import Literal, get_args
|
||||
|
||||
'''
|
||||
This category is used to differentiate types of form elements
|
||||
@ -17,3 +17,6 @@ FormTextCategory = Literal[
|
||||
FormElementCategory.text_piece,
|
||||
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