Visitar URL original
refactor(types): use `extra_items` from PEP 728 · unlayer/unlayer-python@1d8e767 · GitHub
Skip to content

Commit 1d8e767

Browse files
refactor(types): use extra_items from PEP 728
1 parent d64e16c commit 1d8e767

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

‎src/unlayer/types/convert/full_to_simple_create_params.py‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union
6-
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
5+
from typing import Dict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

88
from ..._utils import PropertyInfo
99

@@ -25,12 +25,9 @@ class FullToSimpleCreateParams(TypedDict, total=False):
2525
include_default_values: Annotated[bool, PropertyInfo(alias="includeDefaultValues")]
2626

2727

28-
class DesignTyped(TypedDict, total=False):
28+
class Design(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
2929
body: Required[Dict[str, object]]
3030

3131
counters: Dict[str, object]
3232

3333
schema_version: Annotated[float, PropertyInfo(alias="schemaVersion")]
34-
35-
36-
Design: TypeAlias = Union[DesignTyped, Dict[str, object]]

‎src/unlayer/types/convert/simple_to_full_create_params.py‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union
6-
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
5+
from typing import Dict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

88
from ..._utils import PropertyInfo
99

@@ -24,14 +24,11 @@ class Design_Conversion(TypedDict, total=False):
2424
version: float
2525

2626

27-
class DesignTyped(TypedDict, total=False):
27+
class Design(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
2828
body: Required[Dict[str, object]]
2929

3030
_conversion: Design_Conversion
3131

3232
counters: Dict[str, object]
3333

3434
schema_version: Annotated[float, PropertyInfo(alias="schemaVersion")]
35-
36-
37-
Design: TypeAlias = Union[DesignTyped, Dict[str, object]]

0 commit comments

Comments
 (0)