Skip to content

Commit 16c16bf

Browse files
committed
changes
1 parent c25b1c1 commit 16c16bf

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

demo/paramviewer_component/run.py

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

33
with gr.Blocks() as demo:
44
gr.Markdown("The `round()` function in Python takes two parameters")
5-
gr.ParamViewer( # type: ignore
6-
{
5+
gr.ParamViewer(
6+
{ # type: ignore
77
"number": {
88
"type": "int | float",
99
"description": "The number to round",

gradio/components/chatbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def _postprocess(
587587
for content_item in content_postprocessed:
588588
if content_item.type == "text": # type: ignore
589589
segments = self._extract_thinking_blocks(
590-
content_item.text,
590+
content_item.text, # type: ignore
591591
self.reasoning_tags, # type: ignore
592592
)
593593
for text, is_thinking, status in segments:

gradio/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ async def get_final_item(*args):
580580
output = prediction["data"]
581581
if generated_values:
582582
output = await merge_generated_values_into_output(
583-
self.outputs,
583+
self.outputs, # type: ignore
584584
generated_values,
585585
output, # type: ignore
586586
)

gradio/interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def __init__(
205205
if not isinstance(additional_inputs, Sequence):
206206
additional_inputs = [additional_inputs]
207207
self.additional_input_components = [
208-
get_component_instance(i, unrender=True)
208+
get_component_instance(i, unrender=True) # type: ignore
209209
for i in additional_inputs # type: ignore
210210
]
211211

gradio/oauth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def attach_oauth(app: fastapi.FastAPI):
4646
session_secret = (OAUTH_CLIENT_SECRET or "") + "-v4"
4747
# ^ if we change the session cookie format in the future, we can bump the version of the session secret to make
4848
# sure cookies are invalidated. Otherwise some users with an old cookie format might get a HTTP 500 error.
49-
app.add_middleware( # type: ignore
50-
SessionMiddleware,
49+
app.add_middleware(
50+
SessionMiddleware, # type: ignore
5151
secret_key=hashlib.sha256(session_secret.encode()).hexdigest(),
5252
same_site="none",
5353
https_only=True,

gradio/routes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ def create_app(
439439
app.configure_app(blocks)
440440

441441
app.add_middleware(CustomCORSMiddleware, strict_cors=strict_cors) # type: ignore
442-
app.add_middleware( # type: ignore
443-
BrotliMiddleware,
442+
app.add_middleware(
443+
BrotliMiddleware, # type: ignore
444444
quality=4,
445445
excluded_handlers=[mcp_subpath],
446446
)

test/test_buttons.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class TestClearButton:
99
def test_clear_event_setup_correctly(self):
1010
with gr.Blocks() as demo:
1111
chatbot = gr.Chatbot( # type: ignore
12-
[
12+
[ # type: ignore
1313
{"content": "Hello", "role": "user"},
1414
{"content": "How are you?", "role": "assistant"},
1515
]

test/test_processing_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ def test_float_conversion_dtype(self):
239239
# Test all combinations of dtypes conversions
240240
dtype_combin = np.array(
241241
np.meshgrid( # type: ignore
242-
TestOutputPreprocessing.float_dtype_list,
243-
TestOutputPreprocessing.float_dtype_list,
242+
TestOutputPreprocessing.float_dtype_list, # type: ignore
243+
TestOutputPreprocessing.float_dtype_list, # type: ignore
244244
) # type: ignore
245245
).T.reshape(-1, 2)
246246

0 commit comments

Comments
 (0)