mirror of https://github.com/tiangolo/fastapi.git
fix: resolve ruff lint errors (Dict -> dict, remove outdated version block)
This commit is contained in:
parent
b175737867
commit
831fd18892
|
|
@ -286,7 +286,7 @@ def get_typed_annotation(annotation: Any, globalns: dict[str, Any]) -> Any:
|
|||
return annotation
|
||||
|
||||
|
||||
def _try_resolve_annotated_string(annotation_str: str, globalns: Dict[str, Any]) -> Any:
|
||||
def _try_resolve_annotated_string(annotation_str: str, globalns: dict[str, Any]) -> Any:
|
||||
"""
|
||||
Try to partially resolve an Annotated string annotation.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,15 +2,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
|
||||
# Annotated is available in typing from Python 3.9+
|
||||
# For Python 3.8, we need to import from typing_extensions
|
||||
if sys.version_info >= (3, 9):
|
||||
from typing import Annotated
|
||||
else:
|
||||
from typing import Annotated
|
||||
from typing import Annotated
|
||||
|
||||
from fastapi import Depends, FastAPI
|
||||
from fastapi.testclient import TestClient
|
||||
|
|
|
|||
Loading…
Reference in New Issue