Skip to content

Commit 86dfc7b

Browse files
committed
python: format
1 parent 2264b11 commit 86dfc7b

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

python/ql/test/experimental/dataflow/model-summaries/model_summaries.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def SINK_F(x):
5454
tainted_list = MS_reversed(TAINTED_LIST)
5555
ensure_tainted(
5656
tainted_list, # $ tainted
57-
tainted_list[0] # $ tainted
58-
)
57+
tainted_list[0], # $ tainted
58+
)
5959

6060
# Complex summaries
6161
def box(x):
@@ -67,8 +67,8 @@ def box(x):
6767
tainted_mapped = MS_list_map(box, TAINTED_LIST)
6868
ensure_tainted(
6969
tainted_mapped, # $ tainted
70-
tainted_mapped[0][0] # $ tainted
71-
)
70+
tainted_mapped[0][0], # $ tainted
71+
)
7272

7373
def explicit_identity(x):
7474
return x
@@ -79,35 +79,35 @@ def explicit_identity(x):
7979
tainted_mapped_explicit = MS_list_map(explicit_identity, TAINTED_LIST)
8080
ensure_tainted(
8181
tainted_mapped_explicit, # $ tainted
82-
tainted_mapped_explicit[0] # $ tainted
83-
)
82+
tainted_mapped_explicit[0], # $ tainted
83+
)
8484

8585
via_map_summary = MS_list_map(MS_identity, [SOURCE])
8686
SINK(via_map_summary[0]) # $ flow="SOURCE, l:-1 -> via_map_summary[0]"
8787

8888
tainted_mapped_summary = MS_list_map(MS_identity, TAINTED_LIST)
8989
ensure_tainted(
9090
tainted_mapped_summary, # $ tainted
91-
tainted_mapped_summary[0] # $ tainted
92-
)
91+
tainted_mapped_summary[0], # $ tainted
92+
)
9393

9494
via_append_el = MS_append_to_list([], SOURCE)
9595
SINK(via_append_el[0]) # $ flow="SOURCE, l:-1 -> via_append_el[0]"
9696

9797
tainted_list_el = MS_append_to_list([], TAINTED_STRING)
9898
ensure_tainted(
9999
tainted_list_el, # $ tainted
100-
tainted_list_el[0] # $ tainted
101-
)
100+
tainted_list_el[0], # $ tainted
101+
)
102102

103103
via_append = MS_append_to_list([SOURCE], NONSOURCE)
104104
SINK(via_append[0]) # $ flow="SOURCE, l:-1 -> via_append[0]"
105105

106106
tainted_list_implicit = MS_append_to_list(TAINTED_LIST, NONSOURCE)
107107
ensure_tainted(
108108
tainted_list, # $ tainted
109-
tainted_list[0] # $ tainted
110-
)
109+
tainted_list[0], # $ tainted
110+
)
111111

112112
# Modeled flow-summary is not value preserving
113113
from json import MS_loads as json_loads
@@ -120,5 +120,5 @@ def explicit_identity(x):
120120
tainted_resultlist = json_loads(TAINTED_STRING)
121121
ensure_tainted(
122122
tainted_resultlist, # $ tainted
123-
tainted_resultlist[0] # $ tainted
124-
)
123+
tainted_resultlist[0], # $ tainted
124+
)

0 commit comments

Comments
 (0)