Skip to content

Commit e711861

Browse files
committed
refactor
1 parent b81336c commit e711861

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

dataclass_wizard/_serial_json.pyi

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import json
2-
from typing import AnyStr, Collection, Callable, Protocol, dataclass_transform, Any
2+
from typing import AnyStr, Collection, Callable, Protocol, dataclass_transform, Any, Self
33

44
from ._abstractions import AbstractJSONWizard, W
5-
from ._bases_meta import BaseJSONWizardMeta, HookFn
6-
from .enums import KeyCase
5+
from ._bases_meta import BaseJSONWizardMeta
76
from ._type_def import Decoder, Encoder, JSONObject, ListOfJSONObject
8-
7+
from .enums import KeyCase
98

109
def first_declared_attr_in_mro(cls: type, name: str) -> Callable | Any | None: ...
1110
def set_from_dict_and_to_dict_if_needed(cls: type) -> None: ...
@@ -19,7 +18,7 @@ def configure_wizard_class(cls: type,
1918

2019
class SerializerHookMixin(Protocol):
2120
@classmethod
22-
def _pre_from_dict(cls: type[W], o: JSONObject) -> JSONObject:
21+
def _pre_from_dict(cls: type[Self], o: JSONObject) -> JSONObject:
2322
"""
2423
Optional hook that runs before the dataclass instance is
2524
loaded, and before it is converted from a dictionary object

0 commit comments

Comments
 (0)