Skip to content

Commit 6a8cf35

Browse files
committed
mypy fixes
1 parent 5aae54a commit 6a8cf35

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

fastcrud/endpoint/endpoint_creator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ def __init__(
304304
select_schema, response_key
305305
)
306306
else:
307-
self.list_response_model = None
308-
self.paginated_response_model = None
307+
self.list_response_model = None # type: ignore
308+
self.paginated_response_model = None # type: ignore
309309

310310
def _validate_filter_config(self, filter_config: FilterConfig) -> None:
311311
model_columns = self.crud.model_col_names

fastcrud/paginated/schemas.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Generic, TypeVar, Optional
1+
from typing import Generic, TypeVar, Optional, Type
22

33
from pydantic import BaseModel, create_model
44

@@ -7,16 +7,16 @@
77

88
def create_list_response(
99
schema: type[SchemaType], response_key: str = "data"
10-
) -> type[BaseModel]:
10+
) -> Type[BaseModel]:
1111
"""Creates a dynamic ListResponse model with the specified response key."""
12-
return create_model("DynamicListResponse", **{response_key: (list[schema], ...)})
12+
return create_model("DynamicListResponse", **{response_key: (list[schema], ...)}) # type: ignore
1313

1414

1515
def create_paginated_response(
1616
schema: type[SchemaType], response_key: str = "data"
17-
) -> type[BaseModel]:
17+
) -> Type[BaseModel]:
1818
"""Creates a dynamic PaginatedResponse model with the specified response key."""
19-
return create_model(
19+
return create_model( # type: ignore
2020
"DynamicPaginatedResponse",
2121
**{
2222
response_key: (list[schema], ...),

0 commit comments

Comments
 (0)