Redefining type annotation for a member of a class defined in 3rd party library #1161
-
Hi guys. I have quite large legacy codebase which uses a 3rd-party framework with type annotations. Most part of the codebase looks like this
The problem is that Is there a way to redefine type annotation for |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
from framework import BaseClass
class CustomHandler(BaseClass):
app: MyCustomApp
def process(self, data):
params = self.app.registry.get_params()
self.app.added_in_runtime_property.handle_complex_case(parms, data) Should work, app wouldn't do anything to BaseClass.app (which would still be where python looks for the definition) |
Beta Was this translation helpful? Give feedback.
Should work, app wouldn't do anything to BaseClass.app (which would still be where python looks for the definition)