Skip to content

Commit

Permalink
More & more python3.8+ compatiblity test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssefares committed Aug 21, 2024
1 parent a7ab834 commit 2d367c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_custom_errors.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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}'"
Expand Down

0 comments on commit 2d367c8

Please sign in to comment.