fix: resolve ruff lint errors (Dict -> dict, remove outdated version block)

This commit is contained in:
lif 2025-12-18 22:13:08 +08:00
parent b175737867
commit 831fd18892
2 changed files with 2 additions and 9 deletions

View File

@ -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.

View File

@ -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