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 PEP 695 (Type parameters / generics) #262

Open
Badg opened this issue Jan 15, 2024 · 0 comments
Open

Support for PEP 695 (Type parameters / generics) #262

Badg opened this issue Jan 15, 2024 · 0 comments

Comments

@Badg
Copy link

Badg commented Jan 15, 2024

Related to #229: when writing a generic class/function that uses type parameters, the syntax is incorrectly highlighted. This syntax was introduced in 3.12 via PEP 695.

Currently these are incorrectly scoped as attribute access (see attached screenshots). MVP to reproduce is simply

class Foo[T]:
  pass
  • Editor name and version: Sublime text 4169
  • Platform: Windows 10
  • Color scheme: Monokai
  • MagicPython version: 1.1.1

2024-01-15-magicpython_pep_695
2024-01-15-magicpython_pep_695_scope
2024-01-15-magicpython_pep_695_scope_2

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

1 participant