-
Notifications
You must be signed in to change notification settings - Fork 852
Description
MagicPython doesn't seem to have been updated in 2 years, meaning it doesn't support any of the new syntax in python 3.12:
- Support for PEP 695 (Type parameters / generics) MagicStack/MagicPython#262
- support python 3.12 type alias syntax MagicStack/MagicPython#265
it seems very odd that these new features came out 6 months ago and are still not supported properly in vscode.
there's also the issue with raw strings being incorrectly treated as regex which has been raised many times:
- Wrong highlight for raw string MagicStack/MagicPython#259
- Incorrect syntax coloring for formatted-raw string literals (example: fr"{some_path_here}\some_file_here.txt") MagicStack/MagicPython#149
- Python highlighting - raw string literals incorrectly colour escape sequences in some cases MagicStack/MagicPython#155
- Raw string highlighting MagicStack/MagicPython#114
- Github highlights escape sequences in raw strings. MagicStack/MagicPython#82
i think this is a big source of confusion for users (as you can see from how many times it's been raised), and should be addressed. i think @gilbertohasnofb makes a good argument in MagicStack/MagicPython#259 (comment):
AFAIK this is not a standard defined in any PEP, and popular code formatter such as black will convert any
R''
strings intor''
by default.I get the reasoning behind this decision, and there were some arguments for it since TextMate and Sublime Text both highlight Python syntax this way by default, but with the widespread use of VSCode these days (which does not highlight raw strings in Python this way by default) this argument seems outdated. Ideally this idiosyncratic highlighting could be made optional, preferably off by default.