Skip to content

Commit e30275d

Browse files
committed
chore: remove | Response from annotations as the test CI job breaks
(locally it seems ok with same versions)
1 parent 436e4a4 commit e30275d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/test_core_decorators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def hx_app() -> FastAPI: # noqa: C901
4646
def index(
4747
request: Request, # Testing workaround for FastAPI bug. https://github.com/fastapi/fastapi/pull/12406
4848
random_number: DependsRandomNumber,
49-
) -> list[User] | Response: # Response in type hint to ensure mypy doesn't complain about it.
49+
) -> list[User]:
5050
return users
5151

5252
@app.get("/htmx-or-data")
@@ -55,7 +55,7 @@ def htmx_or_data(
5555
request: Request, # Testing workaround for FastAPI bug. https://github.com/fastapi/fastapi/pull/12406
5656
random_number: DependsRandomNumber,
5757
response: Response,
58-
) -> list[User] | Response: # Response in type hint to ensure mypy doesn't complain about it.
58+
) -> list[User]:
5959
response.headers["test-header"] = "exists"
6060
return users
6161

tests/test_htmy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ def htmy_app() -> FastAPI: # noqa: C901
3333

3434
@app.get("/")
3535
@htmy.page(UserList)
36-
def index() -> list[User] | Response: # Response in type hint to ensure mypy doesn't complain about it.
36+
def index() -> list[User]:
3737
return users
3838

3939
@app.get("/htmx-or-data")
4040
@htmy.hx(UserList)
4141
def htmx_or_data(
4242
response: Response,
43-
) -> list[User] | Response: # Response in type hint to ensure mypy doesn't complain about it.
43+
) -> list[User]:
4444
response.headers["test-header"] = "exists"
4545
return users
4646

0 commit comments

Comments
 (0)