-
Notifications
You must be signed in to change notification settings - Fork 133
Arguments with type hint Optional are incorrect #377
Comments
The return type being |
In this particular example, the return type should be wrapped in
|
Our current way of displaying types separates alternates with commas, which is why I wrote Forgive my mixing of different syntaxes. There's already an issue open for trying to transition to a more PEP 484 style system rather than our existing one (#346), I was just avoiding mixing two different issues in favor of limiting this one to the |
Yeah, sorry for not being clear, I was specifically addressing this part
and hadn't seen the other issue. And your example doesn't return a tuple, like you said, so I'm not sure what I was even thinking. Ignore me. :) |
Closing this, since the new language server's typing system is much more aligned with Python's typing and weird things like this don't show up in the analysis anymore. The only things left are small tooltip tweaks, like #603. |
Should really one of:
If I'm following the same format as my previous "should", then this should really be one of:
But the latter (for both) is nonsensical and really ambiguous when it comes to parameters which are separated by commas, but likely how we'd render things with our current type system. Type alternatives really shouldn't be rendered like this. Related to #346.
The text was updated successfully, but these errors were encountered: