Skip to content

Commit

Permalink
Some style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zhPavel committed Feb 9, 2025
1 parent 668a1c9 commit 09ae5dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/examples/reference/integrations/native_msgspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Music(Struct):
released: datetime.date
composition: str


data = {
"released": datetime.date(2007,1,20),
"composition": "Espacio de silencio",
Expand Down
13 changes: 7 additions & 6 deletions src/adaptix/_internal/integrations/msgspec/native.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
from collections.abc import Iterable
from typing import Any, Callable, Optional, TypedDict, TypeVar

from adaptix import Dumper, Loader, Mediator, Provider
from adaptix._internal.morphing.load_error import LoadError
from adaptix._internal.morphing.provider_template import DumperProvider, LoaderProvider
from adaptix._internal.morphing.request_cls import DumperRequest, LoaderRequest
from adaptix._internal.provider.facade.provider import bound_by_any
from adaptix._internal.provider.loc_stack_filtering import Pred
from ...common import Dumper, Loader
from ...morphing.load_error import LoadError
from ...morphing.provider_template import DumperProvider, LoaderProvider
from ...morphing.request_cls import DumperRequest, LoaderRequest
from ...provider.essential import Mediator, Provider
from ...provider.facade.provider import bound_by_any
from ...provider.loc_stack_filtering import Pred

with contextlib.suppress(ImportError):
from msgspec import ValidationError, convert, to_builtins
Expand Down
2 changes: 1 addition & 1 deletion src/adaptix/_internal/model_tools/introspection/msgspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def get_struct_shape(tp) -> FullShape:
)
for field_id in type_hints
if field_id in init_fields
),
),
kwargs=None,
overriden_types=frozenset(
annotation
Expand Down

0 comments on commit 09ae5dd

Please sign in to comment.