Skip to content

Commit 6cc8f90

Browse files
committed
wip: mixin stuff
1 parent c140bc3 commit 6cc8f90

File tree

18 files changed

+914
-868
lines changed

18 files changed

+914
-868
lines changed

mongospecs/attrs.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
from bson import ObjectId
88
from pymongo import MongoClient
99

10-
from .base import SpecBase, SpecDocumentType, SubSpecBase
11-
from .empty import Empty
12-
from .se import MongoEncoder, mongo_dec_hook
10+
from .base import SpecBase, SubSpecBase
11+
from .types import SpecDocumentType
12+
from .helpers.empty import Empty
13+
from .helpers.se import MongoEncoder, mongo_dec_hook
1314

1415
__all__ = ["Spec", "SubSpec"]
1516

@@ -27,7 +28,7 @@ def attrs_serializer(inst: type, field: attrs.Attribute, value: t.Any) -> t.Any:
2728

2829

2930
@attrs.define(kw_only=True)
30-
class Spec(SpecBase[t.Any]):
31+
class Spec(SpecBase):
3132
_id: t.Optional[ObjectId] = attrs.field(default=None, alias="_id", repr=True) # type: ignore[assignment]
3233

3334
@property
@@ -73,7 +74,7 @@ def to_dict(self) -> dict[str, t.Any]:
7374
return attrs.asdict(self)
7475

7576

76-
class AttrsAdapter(AttrsInstance, SpecBase[SpecDocumentType]): ...
77+
class AttrsAdapter(AttrsInstance, SpecBase): ...
7778

7879

7980
class AdapterBuilder:

0 commit comments

Comments
 (0)