From 7cf414975cdb450665cf4d75b1c2f6ebe2631808 Mon Sep 17 00:00:00 2001 From: cyiallou - Costas <42914163+cyiallou@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:30:35 +0100 Subject: [PATCH] Page size and token no longer optional in pagination Params Removed the initialisation to None for the parameters `page_size` and `page_token` in pagination `Params` as they are no longer optional. Signed-off-by: cyiallou - Costas <42914163+cyiallou@users.noreply.github.com> --- RELEASE_NOTES.md | 4 ++-- src/frequenz/client/common/pagination/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d3cc759a..be9a5dae 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,11 +2,11 @@ ## Summary - +Update of the Pagination `Params` data class. ## Upgrading - +* Pagination `Params` has been changed such that the `page_size` and `page_token` fields are now no longer optional. ## New Features diff --git a/src/frequenz/client/common/pagination/__init__.py b/src/frequenz/client/common/pagination/__init__.py index 7578bd98..77c91bbf 100644 --- a/src/frequenz/client/common/pagination/__init__.py +++ b/src/frequenz/client/common/pagination/__init__.py @@ -19,10 +19,10 @@ class Params: """Parameters for paginating list requests.""" - page_size: int | None = None + page_size: int """The maximum number of results to be returned per request.""" - page_token: str | None = None + page_token: str """The token identifying a specific page of the list results.""" @classmethod