Added vscode settings

This commit is contained in:
Kristofers Solo
2022-04-28 20:54:44 +03:00
parent 245c3ca779
commit 837a479d82
25004 changed files with 2499800 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
a = "bad \\ string
foo \' \" \a \b \c \f \n \r \t \v \5 \55 \555 \05 \005"
def foo(a=1): pass
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
bad : source.python, string.quoted.single.python
\\ : constant.character.escape.python, source.python, string.quoted.single.python
string : source.python, string.quoted.single.python
: invalid.illegal.newline.python, source.python, string.quoted.single.python
foo : source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
' \" \a \b \c \f \n \r \t \v \5 \55 \555 \05 \005" : invalid.illegal.line.continuation.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
= : keyword.operator.python, meta.function.parameters.python, meta.function.python, source.python
1 : constant.numeric.dec.python, meta.function.parameters.python, meta.function.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,34 @@
a = b"bad \\ string
foo \' \" \a \b \c \f \n \r \t \v \5 \55 \555 \05 \005"
def foo(a=1): pass
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
bad : source.python, string.quoted.binary.single.python
\\ : constant.character.escape.python, source.python, string.quoted.binary.single.python
string : source.python, string.quoted.binary.single.python
: invalid.illegal.newline.python, source.python, string.quoted.binary.single.python
foo : source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
' \" \a \b \c \f \n \r \t \v \5 \55 \555 \05 \005" : invalid.illegal.line.continuation.python, source.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
= : keyword.operator.python, meta.function.parameters.python, meta.function.python, source.python
1 : constant.numeric.dec.python, meta.function.parameters.python, meta.function.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,34 @@
a = r"bad string
foo \' \" \a \b \c \f \n \r \t \v \5 \55 \555 \05 \005"
def foo(a=1): pass # doesn't break!
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
r : source.python, storage.type.string.python, string.regexp.quoted.single.python
" : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python
bad string : source.python, string.regexp.quoted.single.python
: invalid.illegal.newline.python, source.python, string.regexp.quoted.single.python
foo : source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
' \" \a \b \c \f \n \r \t \v \5 \55 \555 \05 \005" : invalid.illegal.line.continuation.python, source.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
= : keyword.operator.python, meta.function.parameters.python, meta.function.python, source.python
1 : constant.numeric.dec.python, meta.function.parameters.python, meta.function.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
doesn't break! : comment.line.number-sign.python, source.python

View File

@@ -0,0 +1,47 @@
# issue 150
record = {
"a": {k: str(v) for k, v in foo if ""}
}
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
issue 150 : comment.line.number-sign.python, source.python
record : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
{ : punctuation.definition.dict.begin.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
a : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: : punctuation.separator.dict.python, source.python
: source.python
{ : punctuation.definition.dict.begin.python, source.python
k : source.python
: : punctuation.separator.dict.python, source.python
: source.python
str : meta.function-call.python, source.python, support.type.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
v : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
for : keyword.control.flow.python, source.python
: source.python
k : source.python
, : punctuation.separator.element.python, source.python
: source.python
v : source.python
: source.python
in : keyword.operator.logical.python, source.python
: source.python
foo : source.python
: source.python
if : keyword.control.flow.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
} : punctuation.definition.dict.end.python, source.python
} : punctuation.definition.dict.end.python, source.python

View File

@@ -0,0 +1,35 @@
# issue 150
cmd = "git-clang-format --style=\"{{BasedOnStyle: Google, ColumnLimit: 100, IndentWidth: 2, " \
"AlignConsecutiveAssignments: true}}\" {COMMIT_SHA} -- ./**/*.proto > {OUTPUT}".format(
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
issue 150 : comment.line.number-sign.python, source.python
cmd : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
git-clang-format --style= : source.python, string.quoted.single.python
\" : constant.character.escape.python, source.python, string.quoted.single.python
{{ : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
BasedOnStyle: Google, ColumnLimit: 100, IndentWidth: 2, : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
AlignConsecutiveAssignments: true : source.python, string.quoted.single.python
}} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
\" : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
{COMMIT_SHA} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
-- ./**/*.proto > : source.python, string.quoted.single.python
{OUTPUT} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
. : punctuation.separator.period.python, source.python
format : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python

View File

@@ -0,0 +1,25 @@
a = b"""
multiline "binary" string \
\xf1 \u1234aaaa \U1234aaaa
\N{BLACK SPADE SUIT}
"""
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
multiline "binary" string : source.python, string.quoted.binary.multi.python
\ : constant.language.python, source.python, string.quoted.binary.multi.python
: source.python, string.quoted.binary.multi.python
: source.python, string.quoted.binary.multi.python
\xf1 : constant.character.escape.python, source.python, string.quoted.binary.multi.python
\u1234aaaa \U1234aaaa : source.python, string.quoted.binary.multi.python
: source.python, string.quoted.binary.multi.python
\N{BLACK SPADE SUIT} : source.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python

View File

@@ -0,0 +1,28 @@
a[1] = b'''
multiline 'binary' string \
\xf1 \u1234aaaa \U1234aaaa
\N{BLACK SPADE SUIT}
'''
a : meta.item-access.python, source.python
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
1 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python
] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
multiline 'binary' string : source.python, string.quoted.binary.multi.python
\ : constant.language.python, source.python, string.quoted.binary.multi.python
: source.python, string.quoted.binary.multi.python
: source.python, string.quoted.binary.multi.python
\xf1 : constant.character.escape.python, source.python, string.quoted.binary.multi.python
\u1234aaaa \U1234aaaa : source.python, string.quoted.binary.multi.python
: source.python, string.quoted.binary.multi.python
\N{BLACK SPADE SUIT} : source.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python

View File

@@ -0,0 +1,43 @@
a = "simple \\ string \
foo \' \" \a \b \c \f \n \r \t \v \5 \55 \555 \05 \005"
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
simple : source.python, string.quoted.single.python
\\ : constant.character.escape.python, source.python, string.quoted.single.python
string : source.python, string.quoted.single.python
\ : constant.language.python, source.python, string.quoted.single.python
foo : source.python, string.quoted.single.python
\' : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\" : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\a : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\b : constant.character.escape.python, source.python, string.quoted.single.python
\c : source.python, string.quoted.single.python
\f : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\n : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\r : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\t : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\v : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\5 : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\55 : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\555 : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\05 : constant.character.escape.python, source.python, string.quoted.single.python
: source.python, string.quoted.single.python
\005 : constant.character.escape.python, source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python

View File

@@ -0,0 +1,45 @@
replace = {'"' : R'\"',
"'" : R'\'',
'\\': R'\\'}
replace : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
{ : punctuation.definition.dict.begin.python, source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
" : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
: : punctuation.separator.dict.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
\" : source.python, string.quoted.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.single.python
, : punctuation.separator.element.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
' : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
: : punctuation.separator.dict.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
\' : source.python, string.quoted.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.single.python
, : punctuation.separator.element.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
\\ : constant.character.escape.python, source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: : punctuation.separator.dict.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
\\ : source.python, string.quoted.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.single.python
} : punctuation.definition.dict.end.python, source.python

View File

@@ -0,0 +1,37 @@
a = "{0[ ]:X>+10d}"
a = "{0[ ]!s:X>+10d}"
a = "{0[ ]:Xd>+10d}" #invalid
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
{0[ ] : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
:X>+10d : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, storage.type.format.python, string.quoted.single.python
} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
{0[ ] : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
!s : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, storage.type.format.python, string.quoted.single.python
:X>+10d : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, storage.type.format.python, string.quoted.single.python
} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
{0[ ] : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
: : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, storage.type.format.python, string.quoted.single.python
Xd>+10d} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
invalid : comment.line.number-sign.python, source.python

View File

@@ -0,0 +1,25 @@
a = '''blah {foo-bar %d
blah {foo-bar %d}
blah {foo-bar %d //insane {}}
{}blah {foo-bar %d //insane {}}'''
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
blah {foo-bar : source.python, string.quoted.multi.python
%d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.multi.python
blah : source.python, string.quoted.multi.python
{foo-bar : source.python, string.quoted.multi.python
%d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.multi.python
} : source.python, string.quoted.multi.python
blah {foo-bar : source.python, string.quoted.multi.python
%d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.multi.python
//insane {}} : source.python, string.quoted.multi.python
{}blah {foo-bar : source.python, string.quoted.multi.python
%d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.multi.python
//insane {}} : source.python, string.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.multi.python

View File

@@ -0,0 +1,19 @@
a = R'''\fr{still_ok}ac{m_{j \rightarrow i}(\mathrm{good})}
{not_ok} %d
'''
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python
\fr : source.python, string.quoted.raw.multi.python
{still_ok} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.raw.multi.python
ac : source.python, string.quoted.raw.multi.python
{m_{j \rightarrow i}(\mathrm{good})} : source.python, string.quoted.raw.multi.python
{not_ok} : source.python, string.quoted.raw.multi.python
%d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.raw.multi.python

View File

@@ -0,0 +1,17 @@
a = R'$\frac{m_{j \%srightarrow i}(\mathrm{%sgood})}{\su%m{m_{j \rightarrow i}}}$'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
$\frac : source.python, string.quoted.raw.single.python
{m_{j \ : source.python, string.quoted.raw.single.python
%s : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.raw.single.python
rightarrow i}(\mathrm{ : source.python, string.quoted.raw.single.python
%s : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.raw.single.python
good})}{\su%m{m_{j \rightarrow i}}}$ : source.python, string.quoted.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.single.python

View File

@@ -0,0 +1,23 @@
a = '''\n
{% for item in seq %}
\n {{ item }} \n \N{BLACK SPADE SUIT}
{% endfor %}
'''
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
\n : constant.character.escape.python, source.python, string.quoted.multi.python
{% for item in seq %} : source.python, string.quoted.multi.python
: source.python, string.quoted.multi.python
\n : constant.character.escape.python, source.python, string.quoted.multi.python
{{ item }} : source.python, string.quoted.multi.python
\n : constant.character.escape.python, source.python, string.quoted.multi.python
: source.python, string.quoted.multi.python
\N{BLACK SPADE SUIT} : constant.character.escape.python, source.python, string.quoted.multi.python
{% endfor %} : source.python, string.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.multi.python

View File

@@ -0,0 +1,19 @@
a = R'''\n
{% for item in seq %}
\n {{ item }} \n \N{BLACK SPADE SUIT}
{% endfor %}
'''
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python
\n : source.python, string.quoted.raw.multi.python
{% for item in seq %} : source.python, string.quoted.raw.multi.python
\n {{ item }} \n \N{BLACK SPADE SUIT} : source.python, string.quoted.raw.multi.python
{% endfor %} : source.python, string.quoted.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.raw.multi.python

View File

@@ -0,0 +1,19 @@
a = '''
{{ before detection }}
{# jinja comment #}
{{ after detection }}
'''
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
{{ : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.multi.python
before detection : source.python, string.quoted.multi.python
}} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.multi.python
{# jinja comment #} : source.python, string.quoted.multi.python
{{ after detection }} : source.python, string.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.multi.python

View File

@@ -0,0 +1,19 @@
a = b'%b' % b'foo'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
%b : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python
: source.python
% : keyword.operator.arithmetic.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
foo : source.python, string.quoted.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python

View File

@@ -0,0 +1,29 @@
a = "normal {{ normal }} normal {10!r} normal {fo.__add__!s}".format(fo=1)
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
normal : source.python, string.quoted.single.python
{{ : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
normal : source.python, string.quoted.single.python
}} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
normal : source.python, string.quoted.single.python
{10 : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
!r : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, storage.type.format.python, string.quoted.single.python
} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
normal : source.python, string.quoted.single.python
{fo.__add__ : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
!s : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, storage.type.format.python, string.quoted.single.python
} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
. : punctuation.separator.period.python, source.python
format : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
fo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,50 @@
a = '%i' % 42
a = "%(language)s has %(number)03d quote types."
a = b"%(language)s has %(number)03d quote types."
a = R"%(language)s has %(number)03d quote types."
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
%i : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
% : keyword.operator.arithmetic.python, source.python
: source.python
42 : constant.numeric.dec.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
%(language)s : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.single.python
has : source.python, string.quoted.single.python
%(number)03d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.single.python
quote types. : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
%(language)s : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.binary.single.python
has : source.python, string.quoted.binary.single.python
%(number)03d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.binary.single.python
quote types. : source.python, string.quoted.binary.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.raw.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
%(language)s : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.raw.single.python
has : source.python, string.quoted.raw.single.python
%(number)03d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.raw.single.python
quote types. : source.python, string.quoted.raw.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.raw.single.python

View File

@@ -0,0 +1,28 @@
a = 'qqq{:%Y-%m-%d %H:%M:%S}www'
a = 'qqq{0:{fill}{align}16}www'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
qqq : source.python, string.quoted.single.python
{ : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
: : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, storage.type.format.python, string.quoted.single.python
%Y-%m-%d %H:%M:%S} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
www : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
qqq : source.python, string.quoted.single.python
{0 : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
: : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, storage.type.format.python, string.quoted.single.python
{fill}{align}16} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
www : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python

View File

@@ -0,0 +1,38 @@
a = 'qqq{0:{width}{base}}www'
a = 'qqq{0:$20}www'
a = 'qqq{0}www'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
qqq : source.python, string.quoted.single.python
{0 : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
: : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, storage.type.format.python, string.quoted.single.python
{width}{base}} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
www : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
qqq : source.python, string.quoted.single.python
{0 : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
: : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, storage.type.format.python, string.quoted.single.python
$20} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
www : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
qqq : source.python, string.quoted.single.python
{0} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
www : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python

View File

@@ -0,0 +1,36 @@
a = 'qqqwww'
a = ' { '
a = 'qqq{0:{widt' + 'h}{base}}www'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
qqqwww : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
{ : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
qqq{0:{widt : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
+ : keyword.operator.arithmetic.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
h} : source.python, string.quoted.single.python
{base} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
}www : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python

View File

@@ -0,0 +1,34 @@
# XXX we have to highlight '% o' here, as it is a valid python
# format spec. Otherwise, it would be hard to spot an error in
# the code below.
a = '12% of %s' % ('name',)
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
: comment.line.number-sign.python, source.python
XXX : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
we have to highlight '% o' here, as it is a valid python : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
format spec. Otherwise, it would be hard to spot an error in : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
the code below. : comment.line.number-sign.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
12 : source.python, string.quoted.single.python
% o : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.single.python
f : source.python, string.quoted.single.python
%s : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
% : keyword.operator.arithmetic.python, source.python
: source.python
( : punctuation.parenthesis.begin.python, source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
name : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
, : punctuation.separator.element.python, source.python
) : punctuation.parenthesis.end.python, source.python

View File

@@ -0,0 +1,13 @@
a = R'$\frac{m_{j \rightarrow i}(\mathrm{good})}{\sum{m_{j \rightarrow i}}}$'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
$\frac : source.python, string.quoted.raw.single.python
{m_{j \rightarrow i}(\mathrm{good})}{\sum{m_{j \rightarrow i}}}$ : source.python, string.quoted.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.single.python

View File

@@ -0,0 +1,46 @@
a = 'blah {foo-bar %d'
a = 'blah {foo-bar %d}'
a = 'blah {foo-bar %d //insane {}}'
a = '{}blah {foo-bar %d //insane {}}'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
blah {foo-bar : source.python, string.quoted.single.python
%d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
blah : source.python, string.quoted.single.python
{foo-bar : source.python, string.quoted.single.python
%d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.single.python
} : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
blah : source.python, string.quoted.single.python
{foo-bar : source.python, string.quoted.single.python
%d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.single.python
//insane {}} : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
{} : constant.character.format.placeholder.other.python, meta.format.brace.python, source.python, string.quoted.single.python
blah : source.python, string.quoted.single.python
{foo-bar : source.python, string.quoted.single.python
%d : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.single.python
//insane {}} : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python

View File

@@ -0,0 +1,29 @@
a = 'XXX FIXME NB TODO'
a = r'XXX FIXME NB TODO'
a = b'XXX FIXME NB TODO'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
XXX FIXME NB TODO : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
r : source.python, storage.type.string.python, string.regexp.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python
XXX FIXME NB TODO : source.python, string.regexp.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
XXX FIXME NB TODO : source.python, string.quoted.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python

View File

@@ -0,0 +1,56 @@
a = 's t r'
a = u's t r'
a = b's t r'
a = r's t r'
a = br's t r'
a = rb's t r'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
s t r : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
u : source.python, storage.type.string.python, string.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
s t r : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
s t r : source.python, string.quoted.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
r : source.python, storage.type.string.python, string.regexp.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python
s t r : source.python, string.regexp.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
br : source.python, storage.type.string.python, string.regexp.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python
s t r : source.python, string.regexp.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
rb : source.python, storage.type.string.python, string.regexp.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python
s t r : source.python, string.regexp.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.single.python

View File

@@ -0,0 +1,48 @@
a = U'S T R'
a = B'S T R'
a = R'S T R'
a = BR'S T R'
a = RB'S T R'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
U : source.python, storage.type.string.python, string.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
S T R : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
B : source.python, storage.type.string.python, string.quoted.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
S T R : source.python, string.quoted.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
S T R : source.python, string.quoted.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
BR : source.python, storage.type.string.python, string.quoted.raw.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.binary.single.python
S T R : source.python, string.quoted.raw.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.binary.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
RB : source.python, storage.type.string.python, string.quoted.raw.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.binary.single.python
S T R : source.python, string.quoted.raw.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.binary.single.python

View File

@@ -0,0 +1,68 @@
a = Ur'S T R'
a = UR'S T R'
a = uB'S T R'
a = Ru'S T R'
a = RU'S T R'
a = bR'S T R'
a = Rb'S T R'
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
Ur : invalid.deprecated.prefix.python, source.python, string.regexp.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python
S T R : source.python, string.regexp.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
UR : invalid.deprecated.prefix.python, source.python, string.quoted.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
S T R : source.python, string.quoted.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
uB : source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
S T R : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
R : invalid.illegal.prefix.python, source.python, string.quoted.single.python
u : source.python, storage.type.string.python, string.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
S T R : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
R : invalid.illegal.prefix.python, source.python, string.quoted.single.python
U : source.python, storage.type.string.python, string.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
S T R : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
bR : source.python, storage.type.string.python, string.quoted.raw.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.binary.single.python
S T R : source.python, string.quoted.raw.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.binary.single.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
Rb : source.python, storage.type.string.python, string.quoted.raw.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.raw.binary.single.python
S T R : source.python, string.quoted.raw.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.raw.binary.single.python

View File

@@ -0,0 +1,24 @@
a = R"""
multiline "raw" string \
\xf1 \u1234aaaa \U1234aaaa
\N{BLACK SPADE SUIT}
"""
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.raw.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python
multiline "raw" string : source.python, string.quoted.raw.multi.python
\ : source.python, string.quoted.raw.multi.python
: source.python, string.quoted.raw.multi.python
\xf1 \u1234aaaa \U1234aaaa : source.python, string.quoted.raw.multi.python
: source.python, string.quoted.raw.multi.python
\N : source.python, string.quoted.raw.multi.python
{BLACK SPADE SUIT} : source.python, string.quoted.raw.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.raw.multi.python

View File

@@ -0,0 +1,28 @@
a = """
multiline "unicode" string \
\xf1 \u1234aaaa \U1234aaaa
\N{BLACK SPADE SUIT}
"""
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
multiline "unicode" string : source.python, string.quoted.multi.python
\ : constant.language.python, source.python, string.quoted.multi.python
: source.python, string.quoted.multi.python
: source.python, string.quoted.multi.python
\xf1 : constant.character.escape.python, source.python, string.quoted.multi.python
: source.python, string.quoted.multi.python
\u1234 : constant.character.escape.python, source.python, string.quoted.multi.python
aaaa : source.python, string.quoted.multi.python
\U1234aaaa : constant.character.escape.python, source.python, string.quoted.multi.python
: source.python, string.quoted.multi.python
: source.python, string.quoted.multi.python
\N{BLACK SPADE SUIT} : constant.character.escape.python, source.python, string.quoted.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.multi.python