Skip to content

Allow messages to be inherited #131

@lfse-slafleur

Description

@lfse-slafleur

Currently with the @catch_and_convert_exceptions decorator on each message class it isn't possible to be inherited again. The BaseModel.model_validate classmethod in Pydantic will not receive the correct class as we are pinning the class due to the decorator. A different approach would be to catch and convert the exception using the methods exposed by s2-python in the S2MessageComponent mixin instead of using the class decorator. This should also fix some of the typing/autocomplete issues.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions