Skip to content

Commit

Permalink
make tests run on python3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
nofalx committed Sep 11, 2023
1 parent 9398810 commit 55e4564
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ninja/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def resolve_initials(self, obj):
"""
import warnings
from typing import Any, Callable, Dict, Type, TypeVar, Union, no_type_check
from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union, no_type_check

import pydantic
from django.db.models import Manager, QuerySet
Expand Down Expand Up @@ -226,9 +226,9 @@ def model_validate(
cls: Type[S],
obj: Any,
*,
strict: bool | None = None,
from_attributes: bool | None = None,
context: dict[str, Any] | None = None,
strict: Optional[bool] = None,
from_attributes: Optional[bool] = None,
context: Optional[Dict[str, Any]] = None,
) -> S:
context = context or {}
context["through_model_validate"] = True
Expand Down

0 comments on commit 55e4564

Please sign in to comment.