Skip to content

Commit d6acea1

Browse files
Fix tests
1 parent 52ceb7f commit d6acea1

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

python/ql/lib/semmle/python/frameworks/Gradio.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ module Gradio {
3636
"upload", "release", "select", "stream", "like", "load", "key_up",
3737
])
3838
.getACall()
39-
40-
or this = API::moduleImport("gradio").getMember(["Interface", "ChatInterface"]).getACall()
39+
or
40+
this = API::moduleImport("gradio").getMember(["Interface", "ChatInterface"]).getACall()
4141
}
4242
}
4343

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
| source_test.py:15:15:15:18 | ControlFlowNode for name |
2-
| source_test.py:19:16:19:19 | ControlFlowNode for name |
3-
| source_test.py:26:16:26:19 | ControlFlowNode for name |
4-
| taint_step_test.py:5:12:5:35 | ControlFlowNode for Attribute() |
5-
| taint_step_test.py:6:12:6:35 | ControlFlowNode for Attribute() |
1+
testFailures
2+
failures

python/ql/test/library-tests/frameworks/gradio/source_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212

1313
# decorator
1414
@greet_btn.click(inputs=name, outputs=output)
15-
def greet(name):
15+
def greet(name): # $ source=name
1616
return "Hello " + name + "!"
1717

1818
# `click` event handler with keyword arguments
19-
def greet1(name):
19+
def greet1(name): # $ source=name
2020
return "Hello " + name + "!"
2121

2222
greet1_btn = gr.Button("Hello")
2323
greet1_btn.click(fn=greet1, inputs=name, outputs=output, api_name="greet")
2424

2525
# `click` event handler with positional arguments
26-
def greet2(name):
26+
def greet2(name): # $ source=name
2727
return "Hello " + name + "!"
2828

2929
greet2_btn = gr.Button("Hello")

python/ql/test/library-tests/frameworks/gradio/taint_step_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import os
33

44
with gr.Blocks() as demo:
5-
path = gr.Textbox(label="Path")
6-
file = gr.Textbox(label="File")
5+
path = gr.Textbox(label="Path") # $ source=gr.Textbox(..)
6+
file = gr.Textbox(label="File") # $ source=gr.Textbox(..)
77
output = gr.Textbox(label="Output Box")
88

99

0 commit comments

Comments
 (0)