Skip to content

Commit 370a97a

Browse files
Ihor BilousIhor Bilous
authored andcommitted
Fix issue #21: Fix typing anotation
1 parent 9a9f6d1 commit 370a97a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/contacts/contacts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
def create_contact(
1616
email: str,
17-
fields: Optional[dict[str, Union[str, int, float, bool, str]]] = None,
17+
fields: Optional[dict[str, Union[str, int, float, bool]]] = None,
1818
list_ids: Optional[list[int]] = None,
1919
) -> Contact:
2020
params = mt.CreateContactParams(
@@ -28,7 +28,7 @@ def create_contact(
2828
def update_contact(
2929
contact_id_or_email: str,
3030
new_email: Optional[str] = None,
31-
fields: Optional[dict[str, Union[str, int, float, bool, str]]] = None,
31+
fields: Optional[dict[str, Union[str, int, float, bool]]] = None,
3232
list_ids_included: Optional[list[int]] = None,
3333
list_ids_excluded: Optional[list[int]] = None,
3434
unsubscribed: Optional[bool] = None,

mailtrap/models/contacts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ContactStatus(str, Enum):
5151
@dataclass
5252
class CreateContactParams(RequestParams):
5353
email: str
54-
fields: Optional[dict[str, Union[str, int, float, bool, str]]] = (
54+
fields: Optional[dict[str, Union[str, int, float, bool]]] = (
5555
None # field_merge_tag: value
5656
)
5757
list_ids: Optional[list[int]] = None
@@ -60,7 +60,7 @@ class CreateContactParams(RequestParams):
6060
@dataclass
6161
class UpdateContactParams(RequestParams):
6262
email: Optional[str] = None
63-
fields: Optional[dict[str, Union[str, int, float, bool, str]]] = (
63+
fields: Optional[dict[str, Union[str, int, float, bool]]] = (
6464
None # field_merge_tag: value
6565
)
6666
list_ids_included: Optional[list[int]] = None
@@ -85,7 +85,7 @@ def __post_init__(self) -> None:
8585
class Contact:
8686
id: str
8787
email: str
88-
fields: dict[str, Union[str, int, float, bool, str]] # field_merge_tag: value
88+
fields: dict[str, Union[str, int, float, bool]] # field_merge_tag: value
8989
list_ids: list[int]
9090
status: ContactStatus
9191
created_at: int

0 commit comments

Comments
 (0)