Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ github-actions = [
tests = [
"coverage[toml]>=7.9,<8.0",
"fastapi>=0.128.0",
"mypy==2.4.0",
"mypy==2.4.1",
"pytest>=7.4.0,<10.0.0",
"ruff>=0.15.15",
"uvicorn>=0.39.0",
"ty>=0.0.25",
"httpx2>=2.17.0",

@YuriiMotov YuriiMotov Dec 3, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add httpx2 as test dependency to resolve the following typing error reported by mypy after the Starlette upgrade:

tests/test_cli.py:77: error: Returning Any from function declared to return "Response"  [no-any-return]

Latest Starlette only imports httpx2 when TYPE_CHECKING:

https://github.com/Kludex/starlette/blob/3b1f01ec1e1900837158b08651377a41d25e9817/starlette/testclient.py#L25-L27

So, if there is no httpx2 installed, the Response is resolved as Any

]

[build-system]
Expand Down
2 changes: 1 addition & 1 deletion src/fastapi_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@


try:
from fastapi_new.cli import ( # type: ignore[import-not-found] # ty: ignore[unresolved-import]
from fastapi_new.cli import ( # type: ignore[import-not-found] # ty: ignore[import-not-found]
app as fastapi_new_cli,
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pytest
import uvicorn
from fastapi.testclient import TestClient
from httpx import Response
from httpx2 import Response
from typer.testing import CliRunner
from uvicorn.importer import import_from_string

Expand Down
Loading
Loading