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
Support isinstance() checks in the base types #828
Conversation
@vmarkovtsev we also need to to move extension classes to protocol. |
@rafalp why do we need to move classes in the same PR? Or I don't get what you request... |
@vmarkovtsev can you rebase against master so tests pipeline is run? You will see an error then that |
To avoid the error on e.g. `isinstance(QueryType(), SchemaBindable)` ``` TypeError: Instance and class checks can only be used with @runtime_checkable protocols ```
Co-authored-by: Rafał Pitoń <kontakt@rpiton.com>
Okay, so GH is not letting me run CI for this PR because for some reason there's no "Approve and Run" option 🤦♂️ |
Okay, looking good. Thank you! |
LOL. I'll try to PR a fix ASAP! |
@vmarkovtsev I've removed decorator from one extension class for now and I am researching why GitHub is not running actions for forks. Looks like PR authors need to enable actions on their fork first? |
I'll release current master as 0.15.0dev5 so you can ride the edge if you want to. |
So @runtime_checkable
class Extension(Protocol) works but @runtime_checkable
class ExtensionSync(Extension): doesn't 🤔 Maybe it's not needed because the parent class is already |
Thanks @rafalp! |
|
To avoid the error on e.g.
isinstance(QueryType(), SchemaBindable)