Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Python PEP 677 in Python TextMate grammar #247

Open
alexr00 opened this issue Dec 20, 2021 · 1 comment
Open

Support for Python PEP 677 in Python TextMate grammar #247

alexr00 opened this issue Dec 20, 2021 · 1 comment

Comments

@alexr00
Copy link

alexr00 commented Dec 20, 2021

  • Editor name and version: VS Code
  • Platform: Any
  • Color scheme: Any
  • MagicPython version:
  • A sreenshot:
  • 5-10 lines of surrounding code:

VS Code includes a TextMate grammar for Python. Draft PEP 677 introduces a new syntax for annotating callable signatures. This PEP hasn't been ratified, but it's likely to be in the near future. I recently added support for this feature in pyright (and therefore, in pylance as well). The TextMate grammar will need to be updated to accommodate this new syntax. Currently, it causes VS Code to display the -> token in red.

0e3f81e5-ff24-4f85-81ca-f1519b11088b

Originally from @erictraut in microsoft/vscode#139393

@JelleZijlstra
Copy link

Note this PEP was rejected, so it probably doesn't make sense to add support to MagicPython now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants