diff --git a/api/pagination.py b/api/pagination.py index b08bc30..86d3f82 100644 --- a/api/pagination.py +++ b/api/pagination.py @@ -7,12 +7,11 @@ def get_page(page_size: int, start_after: Optional[Project] = None): """ TODO: Implement this function! - Given a list of items and pagination parameters, return a Page object containing: + Given pagination parameters, return a Page object containing: - The correct slice of items based on the pagination parameters - A boolean indicating if there are more results available Parameters: - items: List of items to paginate page_size: How many items to return per page start_after: Optional item to start pagination after @@ -34,13 +33,11 @@ def get_page_filtered( """ TODO: Implement this function! - Given a list of items, a filter function, and pagination parameters, - return a Page object containing: + Given pagination parameters and a filter function, return a Page object containing: - The correct slice of filtered items based on the pagination parameters - A boolean indicating if there are more results available Parameters: - items: List of items to paginate page_size: How many items to return per page filter_fn: Function to filter items start_after: Optional item to start pagination after diff --git a/package.json b/package.json index a1097ff..0b9da14 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject", "start-frontend": "react-scripts start", - "start-api": "uv run api/app.py" + "start-api": "PYTHONUNBUFFERED=1 uv run api/app.py" }, "browserslist": [ ">0.2%",