diff --git a/backlog/custom_field.py b/backlog/custom_field.py index 946b66b..86320e1 100644 --- a/backlog/custom_field.py +++ b/backlog/custom_field.py @@ -1,5 +1,5 @@ from enum import Enum -from typing import List, TypedDict, NewType, Optional +from typing import List, TypedDict, NewType, Optional, Union class CustomFieldResponse(TypedDict): @@ -57,11 +57,12 @@ class ListCustomFieldResponse(CustomFieldResponse): AddMultipleListCustomFieldResponse = NewType("AddMultipleListCustomFieldResponse", ListCustomFieldResponse) AddCheckboxCustomFieldResponse = NewType("AddCheckboxCustomFieldResponse", ListCustomFieldResponse) AddRadioCustomFieldResponse = NewType("AddRadioCustomFieldResponse", ListCustomFieldResponse) -AddCustomFiledResponse = \ - AddTextCustomFieldResponse | AddSentenceCustomFieldResponse | \ - AddNumberCustomFieldResponse | AddDateCustomFieldResponse | \ - AddSingleListCustomFieldResponse | AddMultipleListCustomFieldResponse | \ - AddCheckboxCustomFieldResponse | AddRadioCustomFieldResponse +AddCustomFiledResponse = Union[ + AddTextCustomFieldResponse, AddSentenceCustomFieldResponse, + AddNumberCustomFieldResponse, AddDateCustomFieldResponse, + AddSingleListCustomFieldResponse, AddMultipleListCustomFieldResponse, + AddCheckboxCustomFieldResponse, AddRadioCustomFieldResponse, +] DeleteTextCustomFieldResponse = NewType("DeleteTextCustomFieldResponse", CustomFieldResponse) DeleteSentenceCustomFieldResponse = NewType("DeleteSentenceCustomFieldResponse", CustomFieldResponse) @@ -71,11 +72,12 @@ class ListCustomFieldResponse(CustomFieldResponse): DeleteMultipleListCustomFieldResponse = NewType("DeleteMultipleListCustomFieldResponse", ListCustomFieldResponse) DeleteCheckboxCustomFieldResponse = NewType("DeleteCheckboxCustomFieldResponse", ListCustomFieldResponse) DeleteRadioCustomFieldResponse = NewType("DeleteRadioCustomFieldResponse", ListCustomFieldResponse) -DeleteCustomFiledResponse = \ - DeleteTextCustomFieldResponse | DeleteSentenceCustomFieldResponse | \ - DeleteNumberCustomFieldResponse | DeleteDateCustomFieldResponse | \ - DeleteSingleListCustomFieldResponse | DeleteMultipleListCustomFieldResponse | \ - DeleteCheckboxCustomFieldResponse | DeleteRadioCustomFieldResponse +DeleteCustomFiledResponse = Union[ + DeleteTextCustomFieldResponse, DeleteSentenceCustomFieldResponse, + DeleteNumberCustomFieldResponse, DeleteDateCustomFieldResponse, + DeleteSingleListCustomFieldResponse, DeleteMultipleListCustomFieldResponse, + DeleteCheckboxCustomFieldResponse, DeleteRadioCustomFieldResponse, +] class CustomField(object):