Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add support for PEP 585 #229
Comments
|
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 There are scopes for type hint comments though:
I would love to see one or multiple scope(s) for inline type hints (variables, parameters, returns) like PyCharm has. EDIT: with the new |
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.listvs.typing.List).As such, in the screenshot below, the type hint for argument
cisn't highlighted properly. Inlist[int], bothlistandintshould be highlighted, whereas onlyintis highlighted currently. The type hint for argumentbis highlighted correctly (and same fora).