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
Do you have the above somewhere?
The text was updated successfully, but these errors were encountered:
I'm also looking for stubs to this lib, but for pyright (which is used inside pylance).
I'm not very familiar with stubs rules, but I wrote a little __init__.pyi to solve my problem for now, shown below.
__init__.pyi
But it does not cover the case of multiple interfaces implementation.
For this particular case, I have to manually create the output of implements and then create the implementation by multiple inheritance:
implements
class I1(Interface): def method1(self, x): pass class I2(Interface): def method2(self, y): pass iI1, iI2 = implements(I1), implements(I2) class ImplBoth(iI1,iI2): ...
For the other cases, this stub is working, so far.
from .default import default as default from .interface import (implements as implements, Interface as Interface, InvalidImplementation as InvalidImplementation) __all__ = [ "default", "InvalidImplementation", "Interface", "implements", ] from typing import TypeVar InterfaceType = TypeVar("InterfaceType") DefaultMethod = TypeVar("DefaultMethod") class Interface: ... def implements(interface: InterfaceType) -> InterfaceType: ... def default(method: DefaultMethod) -> DefaultMethod: """Default implementation of a function in terms of interface methods.""" ...
Sorry, something went wrong.
No branches or pull requests
Do you have the above somewhere?
The text was updated successfully, but these errors were encountered: