Skip to content

Commit

Permalink
🐛 Fix type annotations and import workarounds after dropping Python 3…
Browse files Browse the repository at this point in the history
….6 support
  • Loading branch information
tiangolo committed Sep 14, 2022
1 parent 8ee7c5e commit c52e2ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion fastapi/dependencies/utils.py
Expand Up @@ -7,6 +7,7 @@
Callable,
Coroutine,
Dict,
ForwardRef,
List,
Mapping,
Optional,
Expand Down Expand Up @@ -47,7 +48,7 @@
Undefined,
)
from pydantic.schema import get_annotation_from_field_info
from pydantic.typing import ForwardRef, evaluate_forwardref
from pydantic.typing import evaluate_forwardref
from pydantic.utils import lenient_issubclass
from starlette.background import BackgroundTasks
from starlette.concurrency import run_in_threadpool
Expand Down
4 changes: 2 additions & 2 deletions fastapi/encoders.py
Expand Up @@ -54,8 +54,8 @@ def jsonable_encoder(
if custom_encoder:
encoder.update(custom_encoder)
obj_dict = obj.dict(
include=include, # type: ignore # in Pydantic
exclude=exclude, # type: ignore # in Pydantic
include=include,
exclude=exclude,
by_alias=by_alias,
exclude_unset=exclude_unset,
exclude_none=exclude_none,
Expand Down

0 comments on commit c52e2ee

Please sign in to comment.