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
Since PEP 585 implemented in Python 3.9, one can use the generics syntax even with built-in collections, not just those included in typing (e.g. list vs. typing.List).
As such, in the screenshot below, the type hint for argument c isn't highlighted properly. In list[int], both list and int should be highlighted, whereas only int is highlighted currently. The type hint for argument b is highlighted correctly (and same for a).
Editor name and version: VS Code 1.51.1
Platform: Ubuntu 16.04
Color scheme: Tomorrow Night (also tested with other ones but none exhibit the desired behavior)
MagicPython version: From the VS Code extension = 1.1.0
A screenshot:
5-10 lines of surrounding code: None
The text was updated successfully, but these errors were encountered:
Unfortunately there is no scope for inline type hints at all - as far as I could find.
The yellow highlighting in your screenshot is because int and list have the scope support.type.python. This scope also applies for the int in this snippet: print(int(1.2)).
Since PEP 585 implemented in Python 3.9, one can use the generics syntax even with built-in collections, not just those included in
typing
(e.g.list
vs.typing.List
).As such, in the screenshot below, the type hint for argument
c
isn't highlighted properly. Inlist[int]
, bothlist
andint
should be highlighted, whereas onlyint
is highlighted currently. The type hint for argumentb
is highlighted correctly (and same fora
).The text was updated successfully, but these errors were encountered: