Skip to content

chore(internal): codegen related update #641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged
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
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: Optional[Paging] = None
paging: Paging

@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:
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
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:
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
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: Optional[Paging] = None
paging: Paging

@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:
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
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:
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
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: Optional[Paging] = None
paging: Paging

@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:
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
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:
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
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: Optional[Paging] = None
paging: Paging

@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:
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
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:
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
if self.paging.count is not None:
count = self.paging.count
if count is None:
Expand Down