rm type ignore (#25715)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
Asuka Minato
2025-10-21 12:26:58 +09:00
committed by GitHub
parent c11cdf7468
commit 32c715c4d0
78 changed files with 229 additions and 204 deletions

View File

@@ -43,7 +43,7 @@ class TestWorkflowResponseConverterFetchFilesFromVariableValue:
"""Test with None input"""
# The method signature expects Union[dict, list, Segment], but implementation handles None
# We'll test the actual behavior by passing an empty dict instead
result = WorkflowResponseConverter._fetch_files_from_variable_value(None) # type: ignore
result = WorkflowResponseConverter._fetch_files_from_variable_value(None)
assert result == []
def test_fetch_files_from_variable_value_with_empty_dict(self):

View File

@@ -235,7 +235,7 @@ class TestIndividualHandlers:
# Type assertion needed due to union type
text_content = result.content[0]
assert hasattr(text_content, "text")
assert text_content.text == "test answer" # type: ignore[attr-defined]
assert text_content.text == "test answer"
def test_handle_call_tool_no_end_user(self):
"""Test call tool handler without end user"""

View File

@@ -212,7 +212,7 @@ class TestValidateResult:
parameters=[
ParameterConfig(
name="status",
type="select", # type: ignore
type="select",
description="Status",
required=True,
options=["active", "inactive"],
@@ -400,7 +400,7 @@ class TestTransformResult:
parameters=[
ParameterConfig(
name="status",
type="select", # type: ignore
type="select",
description="Status",
required=True,
options=["active", "inactive"],
@@ -414,7 +414,7 @@ class TestTransformResult:
parameters=[
ParameterConfig(
name="status",
type="select", # type: ignore
type="select",
description="Status",
required=True,
options=["active", "inactive"],

View File

@@ -248,4 +248,4 @@ def test_constructor_with_extra_key():
# Test that SystemVariable should forbid extra keys
with pytest.raises(ValidationError):
# This should fail because there is an unexpected key.
SystemVariable(invalid_key=1) # type: ignore
SystemVariable(invalid_key=1)