Skip to content

Commit b81336c

Browse files
committed
refactor
1 parent ea1adf4 commit b81336c

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

dataclass_wizard/_bases.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class _BaseHookRegistry:
7373
def get_hook(cls, typ: type) -> Callable | None: ...
7474

7575
class BaseLoadHook(_BaseHookRegistry):
76-
__HOOKS__: _ClassVar[dict] = ...
76+
__HOOKS__: _ClassVar[dict[type, Callable]]
7777

7878
class BaseDumpHook(_BaseHookRegistry):
79-
__HOOKS__: _ClassVar[dict] = ...
79+
__HOOKS__: _ClassVar[dict[type, Callable]]

dataclass_wizard/_dumpers.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ _DUMP_HOOKS: str
3232
_KNOWN_FACTORY_LITERALS: dict
3333
D = TypeVar('D', bound=DumpMixin)
3434

35-
def get_default_dump_hooks(dumper: type[D] = DumpMixin) -> dict[type, Callable]: ...
35+
def get_default_dump_hooks(dumper: type[D]) -> dict[type, Callable]: ...
3636
def default_compare_expr(f: Field[Any], locals_ns: dict[str, Any], default_name: str, *, allow_calling_unknown_factories: bool = ...) -> str | None: ...
3737
def _type_returns_value_unchanged(arg, leaf_handling_as_subclass, origin: Incomplete | None = ...): ...
3838
def _all_return_value_unchanged(args, leaf_handling_as_subclass): ...
3939

4040
class DumpMixin(BaseDumpHook):
4141
transform_dataclass_field: ClassVar[None | EllipsisType] = ...
42-
__HOOKS__: ClassVar[dict[type, Callable] | EllipsisType] = ...
42+
__HOOKS__: ClassVar[dict[type, Callable]]
4343
@classmethod
4444
def __init_subclass__(cls, _setup_defaults: bool = True, **kwargs): ...
4545
@staticmethod

dataclass_wizard/_loaders.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ L = TypeVar('L', bound=LoadMixin)
3535

3636
class LoadMixin(BaseLoadHook):
3737
transform_json_field: ClassVar[Callable[[str], str] | None | EllipsisType] = ...
38-
__HOOKS__: ClassVar[dict[type, Callable] | EllipsisType] = ...
38+
__HOOKS__: ClassVar[dict[type, Callable]]
3939
@classmethod
4040
def __init_subclass__(cls, _setup_defaults: bool = True, **kwargs): ...
4141
@staticmethod

dataclass_wizard/mixins/json.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from .._serial_json import JSONWizard, SerializerHookMixin
66
from .._type_def import FileType, Decoder, ListOfJSONObject, T, FileDecoder, FileEncoder
77
from ..utils.containers import Container
88

9-
class JSONListWizard(JSONWizard, str=False):
9+
class JSONListWizard(JSONWizard):
1010

1111
@classmethod
1212
def from_json(cls: type[W], string: AnyStr, *,

0 commit comments

Comments
 (0)