FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/python/extractor/tests/parser/strings.py at codeql-cli-2.19.2 · github/codeql · GitHub
github
/
codeql
Public
Notifications
You must be signed in to change notification settings
Fork
2.1k
Star
10.1k
Code
Issues
1k
Pull requests
469
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
python
/
extractor
/
tests
/
parser
/
strings.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
79 lines (79 loc) · 1.72 KB
Breadcrumbs
codeql
/
python
/
extractor
/
tests
/
parser
/
strings.py
Copy path
File metadata and controls
79 lines (79 loc) · 1.72 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
if
1
:
"double quotes"
if
2
:
'single quotes'
if
3
:
"""triple double quotes (sextuple quotes?)"""
if
4
:
'''triple single quotes'''
if
5
:
r"raw string"
if
6
:
b"byte string"
if
7
:
u"unicode string"
if
8
:
br"raw byte string"
if
9
:
"Let's put some control
\t
characters in here
\n
"
if
10
:
"""
Multiline
string
time
"""
if
11
:
"escaped
\"
quotes
\"
here"
if
12
:
"""Unescaped "quotes" inside triple quotes"""
if
13
:
"string"
"""concatenation"""
'here'
'''oh yeah'''
if
14
:
f"format string with no funny business"
if
15
:
f"format string with
{
1
}
interpolation"
if
16
:
f"
{
2
}
{
3
}
{
4
}
"
if
17
:
f"and a format string with
{
'nested'
}
string"
if
18
:
f"foo
{
x
}
bar"
"regular string"
if
19
:
pass
# This doesn't quite give the right result, but it's close enough.
#f"no interpolation" ' but still implicit concatenation'
if
20
:
f"
{
9
}
"
"blah"
f'
{
10
}
'
if
21
:
f"format
{
129
}
string"
"not format"
if
21.1
:
# regression from https://github.com/github/codeql/issues/9940
f"format
{
123
}
string"
f"technically format string
\n
"
if
22
:
"again not format"
f"format again
{
foo
}
hello"
if
23
:
f"""f-string with
{
"inner "
'implicit '
'''concatenation'''
}
how awful"""
if
24
:
f'''oh no python
{
f'why do you
{
"allow"
}
such'
}
absolute horrors?'''
if
25
:
b"""5"""
b"byte format"
if
26
:
r'X(\u0061|a)*Y'
if
27
:
f"""triple-quoted
{
11
}
""f-st"""
fr"""ri'''ng\\\\\""
{
12
}
with an inner quoted part"""
if
28
:
f'
{
value
:{
width
+
padding
!r}.{
precision
}
}
'
if
29
:
f'
{
1
,
}
'
if
30
:
fr"""quotes before interpolation "
{
123
}
" are okay."""
if
31
:
fr"""backslash before an interpolation \
{
456
}
\ are okay."""
if
32
:
f''
if
33
:
''
if
34
:
b'
\xc5
\xe5
'
if
35
:
f"
{
x
=
}
"
Back
|
FazBrowse Home
|
New Git URL