From 54a3df038e99d255c56b12338102c507ab66ffda Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Mon, 10 Jun 2024 13:39:06 +0200 Subject: [PATCH] Fix: Models were not exposed as public in `aleph_message.models`. This caused issues from Mypy in the form `error: Module "aleph_message.models" does not explicitly export attribute "MessageType" [attr-defined]` Solution: Expose models that should be public. --- aleph_message/models/__init__.py | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/aleph_message/models/__init__.py b/aleph_message/models/__init__.py index e84adbe..f6d073b 100644 --- a/aleph_message/models/__init__.py +++ b/aleph_message/models/__init__.py @@ -11,11 +11,41 @@ from .abstract import BaseContent from .base import Chain, HashType, MessageType -from .execution.base import MachineType, Payment, PaymentType # noqa +from .execution.base import MachineType, Payment, PaymentType from .execution.instance import InstanceContent from .execution.program import ProgramContent from .item_hash import ItemHash, ItemType +__all__ = [ + "AggregateContent", + "AggregateMessage", + "AlephMessage", + "AlephMessageType", + "Chain", + "ChainRef", + "ExecutableContent", + "ExecutableMessage", + "ForgetContent", + "ForgetMessage", + "HashType", + "InstanceContent", + "InstanceMessage", + "ItemHash", + "ItemType", + "MachineType", + "MessageConfirmation", + "MessageConfirmationHash", + "MessageType", + "Payment", + "PaymentType", + "PostContent", + "PostMessage", + "ProgramContent", + "ProgramMessage", + "StoreContent", + "StoreMessage", +] + class MongodbId(BaseModel): """PyAleph returns an internal MongoDB id"""