Skip to content

Redefining type annotation for a member of a class defined in 3rd party library #1161

Answered by Gobot1234
dmi-dmi-dmi asked this question in Q&A
Discussion options

You must be logged in to vote
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)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dmi-dmi-dmi
Comment options

Answer selected by dmi-dmi-dmi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants