MagicStack / MagicStack/MagicPython
Support for Python PEP 677 in Python TextMate grammar
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
* **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](https://www.python.org/dev/peps/pep-0677/) 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.

Originally from @erictraut in https://github.com/microsoft/vscode/issues/139393
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Python TextMate grammar used for VS Code and read PEP 677 alongside the existing grammar rules. Use the callable-signature syntax described in the issue as a highlighting example; done means the new syntax, including the arrow token, is highlighted without the reported red error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100