Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion 2 gitlab/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def next_page(self) -> Optional[int]:
return self._list.next_page

@property
def per_page(self) -> int:
def per_page(self) -> Optional[int]:
"""The number of items per page."""
return self._list.per_page

Expand Down
6 changes: 2 additions & 4 deletions 6 gitlab/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,11 +1039,9 @@ def next_page(self) -> Optional[int]:
return int(self._next_page) if self._next_page else None

@property
def per_page(self) -> int:
def per_page(self) -> Optional[int]:
"""The number of items per page."""
if TYPE_CHECKING:
assert self._per_page is not None
return int(self._per_page)
return int(self._per_page) if self._per_page is not None else None

# NOTE(jlvillal): When a query returns more than 10,000 items, GitLab doesn't return
# the headers 'x-total-pages' and 'x-total'. In those cases we return None.
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.