Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a msgspec.Struct abstract class #725

Open
arthurbrenno opened this issue Aug 25, 2024 · 0 comments
Open

Creating a msgspec.Struct abstract class #725

arthurbrenno opened this issue Aug 25, 2024 · 0 comments

Comments

@arthurbrenno
Copy link

Question

Hi. How can I create a class that is a msgspec.struct class, but it is not intended to be instantiated directly?

Example:

class Entity(msgspec.Struct, ABC):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
make[1]: *** [run] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant