From 2d367c8ea34ccf2fad02723e5c8d19dac678245c Mon Sep 17 00:00:00 2001 From: Youssef Date: Wed, 21 Aug 2024 11:22:30 +0100 Subject: [PATCH] More & more python3.8+ compatiblity test fixes --- tests/test_custom_errors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_custom_errors.py b/tests/test_custom_errors.py index abcff1cff..741ab9679 100644 --- a/tests/test_custom_errors.py +++ b/tests/test_custom_errors.py @@ -1,4 +1,4 @@ -from typing import Any, List +from typing import Any, Dict, List, Optional from unittest import TestCase from unittest.mock import ANY @@ -131,7 +131,7 @@ def test_custom_pydantic_error_overrides(): class CustomErrorWithCustomTemplate(PydanticCustomError): @override def __new__( - cls, error_type: LiteralString, my_custom_setting: str, context: dict[str, Any] | None = None + cls, error_type: LiteralString, my_custom_setting: str, context: Optional[Dict[str, Any]] = None ) -> Self: message_template = ( "'{my_custom_value}' setting requires a specific my custom field value, got '{wrong_value}'"