Skip to content

Commit

Permalink
chore(internal): codegen related update (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Feb 11, 2025
1 parent 8cc5d9f commit aebf66b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/finch/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def next_page_info(self) -> None:
class SyncIndividualsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
individuals: List[_T]
"""The array of employees."""
paging: Paging
paging: Optional[Paging] = None

@override
def _get_page_items(self) -> List[_T]:
Expand All @@ -135,7 +135,7 @@ def _get_page_items(self) -> List[_T]:
@override
def next_page_info(self) -> Optional[PageInfo]:
offset = None
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
if self.paging is not None:
if self.paging.offset is not None:
offset = self.paging.offset
if offset is None:
Expand All @@ -145,7 +145,7 @@ def next_page_info(self) -> Optional[PageInfo]:
current_count = offset + length

count = None
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
if self.paging is not None:
if self.paging.count is not None:
count = self.paging.count
if count is None:
Expand All @@ -160,7 +160,7 @@ def next_page_info(self) -> Optional[PageInfo]:
class AsyncIndividualsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
individuals: List[_T]
"""The array of employees."""
paging: Paging
paging: Optional[Paging] = None

@override
def _get_page_items(self) -> List[_T]:
Expand All @@ -172,7 +172,7 @@ def _get_page_items(self) -> List[_T]:
@override
def next_page_info(self) -> Optional[PageInfo]:
offset = None
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
if self.paging is not None:
if self.paging.offset is not None:
offset = self.paging.offset
if offset is None:
Expand All @@ -182,7 +182,7 @@ def next_page_info(self) -> Optional[PageInfo]:
current_count = offset + length

count = None
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
if self.paging is not None:
if self.paging.count is not None:
count = self.paging.count
if count is None:
Expand All @@ -196,7 +196,7 @@ def next_page_info(self) -> Optional[PageInfo]:

class SyncPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
data: List[_T]
paging: Paging
paging: Optional[Paging] = None

@override
def _get_page_items(self) -> List[_T]:
Expand All @@ -208,7 +208,7 @@ def _get_page_items(self) -> List[_T]:
@override
def next_page_info(self) -> Optional[PageInfo]:
offset = None
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
if self.paging is not None:
if self.paging.offset is not None:
offset = self.paging.offset
if offset is None:
Expand All @@ -218,7 +218,7 @@ def next_page_info(self) -> Optional[PageInfo]:
current_count = offset + length

count = None
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
if self.paging is not None:
if self.paging.count is not None:
count = self.paging.count
if count is None:
Expand All @@ -232,7 +232,7 @@ def next_page_info(self) -> Optional[PageInfo]:

class AsyncPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
data: List[_T]
paging: Paging
paging: Optional[Paging] = None

@override
def _get_page_items(self) -> List[_T]:
Expand All @@ -244,7 +244,7 @@ def _get_page_items(self) -> List[_T]:
@override
def next_page_info(self) -> Optional[PageInfo]:
offset = None
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
if self.paging is not None:
if self.paging.offset is not None:
offset = self.paging.offset
if offset is None:
Expand All @@ -254,7 +254,7 @@ def next_page_info(self) -> Optional[PageInfo]:
current_count = offset + length

count = None
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
if self.paging is not None:
if self.paging.count is not None:
count = self.paging.count
if count is None:
Expand Down

0 comments on commit aebf66b

Please sign in to comment.