You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behavior is correct. "Runs fine" doesn't say anything about whether your static types are correct, and your static types are not in fact correct. Your Order is defined as requiring an entry for 'sub_orders'. That entry may be set to None, but it must not be entirely absent.
Hmm okay. Is it possible to achieve what I want then? I've tried fiddling with Union of two Order types, one with sub_orders and one without. No luck though.
Environment data
Expected behaviour
I'd expect pylance to not flag any issues with the following code that passes just fine.
Actual behaviour
However I get the following message regarding the line with
Order(name="Pizza")
.Another issue is that the IntelliSense doesn't seem to work either. It just shows
Order(*kwargs, **kwargs)
when I start typingOrder(
The text was updated successfully, but these errors were encountered: