Skip to content
Discussion options

You must be logged in to vote

We should do something similar to query, where you pass on the type and it validates it at runtime and statically.

In the meantime try an assert isinstance(widget, MyWidget) to quell PyLance.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@aaronst
Comment options

@willmcgugan
Comment options

Answer selected by aaronst
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