Skip to content
Open
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
10 changes: 9 additions & 1 deletion proofline/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,15 @@ def _review_url(base_url: str, organization_id: UUID, review_id: UUID) -> str:


def _page_limits(page_size: int, max_pages: int, max_items: int) -> None:
if not 1 <= page_size <= 100 or not 1 <= max_pages <= 1_000 or not 1 <= max_items <= 100_000:
if (

@aman-ali07 aman-ali07 Nov 28, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The logic looks good to me. If you would like a companion test, a small parametrized one in tests/ would keep the bool case from coming back — there is no coverage of _page_limits in the suite today. Totally optional, and happy with whatever you prefer.

any(
isinstance(value, bool) or not isinstance(value, int)
for value in (page_size, max_pages, max_items)
)
or not 1 <= page_size <= 100
or not 1 <= max_pages <= 1_000
or not 1 <= max_items <= 100_000
):
raise ValueError(
"Pagination requires page_size 1..100, max_pages 1..1000, max_items 1..100000."
)
Expand Down