We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a strange problem with PyPika when I use abstract classes.
from abc import ABC class Test(ABC): pass class Message(Test): LIST_QUERY = Query.from_('messages') a = Message()
TypeError: Can't instantiate abstract class Message with abstract method LIST_QUERY
When I remove Test from class args it work correctly. What is the problem?
The text was updated successfully, but these errors were encountered:
Seems like the Message gets LIST_QUERY as an abstract method. i.e. Message.__abstractmethods__
Message.__abstractmethods__
This provides the same error. Might be related somehow
from abc import ABC, abstractmethod class Test(ABC): @abstractmethod def LIST_QUERY(self): pass class Message(Test): pass a = Message()
Diving into the abc source code a bit: https://github.com/python/cpython/blob/main/Lib/abc.py
Sorry, something went wrong.
No branches or pull requests
I have a strange problem with PyPika when I use abstract classes.
TypeError: Can't instantiate abstract class Message with abstract method LIST_QUERY
When I remove Test from class args it work correctly.
What is the problem?
The text was updated successfully, but these errors were encountered: