runtime(python): Update syntax, fix pythonEllipsis pattern

fixes: #18263
closes: #18264

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Doug Kearns
2025-09-11 13:54:51 -04:00
committed by Christian Brabandt
parent 5a9ef93b2c
commit 15070eee2f
4 changed files with 8 additions and 5 deletions

View File

@ -314,7 +314,7 @@ if !exists("python_no_builtin_highlight")
\ contains=ALLBUT,pythonBuiltin,pythonClass,pythonFunction,pythonType,pythonAsync
\ transparent
" the ellipsis literal `...` can be used in multiple syntactic contexts
syn match pythonEllipsis "\.\@1<!.\.\.\ze\.\@!" display
syn match pythonEllipsis "\.\@1<!\.\.\.\ze\.\@!" display
endif
" From the 'Python Library Reference' class hierarchy at the bottom.

View File

@ -17,4 +17,4 @@
|[+0#e000e06&|0|,| |1|,| |.+0#00e0e07&@2|,+0#e000e06&| |1|8|,| |1|9|]| +0#0000000&@55
|>+0#e000e06&@2| |e+0#00e0e07&|x|e|c|(+0#0000000&|s|)| +0#e000e06&@1|#+0#0000e05&|d|o|c|t|e|s|t|:| |+|E|L@1|I|P|S|I|S| +0#0000000&@42
|-+0#e000e06&|3|.|2|1|7|1|6|0|3|4|2|7|2|e|-|0|.+0#00e0e07&@2|7+0#e000e06&| +0#0000000&@53
@57|1|9|,|1| @9|5|4|%|
@57|1|9|,|1| @9|4|8|%|

View File

@ -10,11 +10,11 @@
@75
|#+0#0000e05&| |N|u|m|p|y| +0#0000000&@67
|x|[|.+0#00e0e07&@2|,+0#0000000&| |0+0#e000002&|]+0#0000000&| @65
@75
|#+0#0000e05&| |I|s@1|u|e| |#|1|8|2|6|3| |(|P|y|t|h|o|n| |h|i|g|h|l|i|g|h|t|i|n|g| |e|l@1|i|p|s|i|s|,| |f|a|l|s|e| |p|o|s|i|t|i|v|e|)| +0#0000000&@13
|a| |=| |"+0#e000002&|.@1|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@56
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|3|7|,|2|-|9| @7|B|o|t|

View File

@ -41,3 +41,6 @@ class C:
# Numpy
x[..., 0]
# Issue #18263 (Python highlighting ellipsis, false positive)
a = ".." # comment