Skip to content

Commit 5b97610

Browse files
committed
LCORE-2847: Optional type
1 parent c62c782 commit 5b97610

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎tests/e2e/features/steps/tls.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ def reset_tls_prow_state() -> None:
4444
clear_llama_config_backup()
4545

4646

47-
def is_tls_feature_file(feature_filename: str | None) -> bool:
47+
def is_tls_feature_file(feature_filename: Optional[str]) -> bool:
4848
"""Return True for split TLS feature files (``tls-ca.feature``, etc.)."""
4949
if not feature_filename:
5050
return False
5151
basename = os.path.basename(feature_filename)
5252
return basename.startswith("tls-") and basename.endswith(".feature")
5353

5454

55-
def prepare_tls_feature_entry_on_prow(feature_filename: str | None = None) -> None:
55+
def prepare_tls_feature_entry_on_prow(feature_filename: Optional[str] = None) -> None:
5656
"""Baseline cluster state at the start of each tls-*.feature file.
5757
5858
Mock TLS stays up for the whole tls suite (tls-ca → tls-mtls → tls-tlsv13).

‎tests/integration/conftest.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ def create_agent_run_result( # pylint: disable=too-many-arguments,too-many-posi
176176
response_id: str = "response-123",
177177
input_tokens: int = 10,
178178
output_tokens: int = 5,
179-
model_response: ModelResponse | None = None,
180-
new_messages: list[ModelMessage] | None = None,
179+
model_response: Optional[ModelResponse] = None,
180+
new_messages: Optional[list[ModelMessage]] = None,
181181
) -> AgentRunResult[str]:
182182
"""Create a mock AgentRunResult wired for retrieve_agent_response.
183183

‎tests/unit/app/endpoints/test_feedback.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def test_update_feedback_status_concurrent(mocker: MockerFixture) -> None:
401401
auth: AuthTuple = ("test_user_id", "test_user", True, "test_token")
402402
thread_args = [(0, False), (1, True), (2, False)]
403403
results: list[Any] = [None] * len(thread_args)
404-
errors: list[Exception | None] = [None] * len(thread_args)
404+
errors: list[Optional[Exception]] = [None] * len(thread_args)
405405
barrier = threading.Barrier(len(thread_args) + 1)
406406

407407
def worker(index: int, desired_status: bool) -> None:

0 commit comments

Comments
 (0)