Skip to content

Commit

Permalink
fix: invalid syntax within 3.8 and 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
hassaku63 committed Sep 3, 2023
1 parent 96a3fa8 commit 9f1a855
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions backlog/custom_field.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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)
Expand All @@ -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):
Expand Down

0 comments on commit 9f1a855

Please sign in to comment.