Skip to content

Commit 89df119

Browse files
chore(internal): codegen related update (#641)
1 parent cc9ebd6 commit 89df119

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/finch/pagination.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def next_page_info(self) -> None:
123123
class SyncIndividualsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
124124
individuals: List[_T]
125125
"""The array of employees."""
126-
paging: Optional[Paging] = None
126+
paging: Paging
127127

128128
@override
129129
def _get_page_items(self) -> List[_T]:
@@ -135,7 +135,7 @@ def _get_page_items(self) -> List[_T]:
135135
@override
136136
def next_page_info(self) -> Optional[PageInfo]:
137137
offset = None
138-
if self.paging is not None:
138+
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
139139
if self.paging.offset is not None:
140140
offset = self.paging.offset
141141
if offset is None:
@@ -145,7 +145,7 @@ def next_page_info(self) -> Optional[PageInfo]:
145145
current_count = offset + length
146146

147147
count = None
148-
if self.paging is not None:
148+
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
149149
if self.paging.count is not None:
150150
count = self.paging.count
151151
if count is None:
@@ -160,7 +160,7 @@ def next_page_info(self) -> Optional[PageInfo]:
160160
class AsyncIndividualsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
161161
individuals: List[_T]
162162
"""The array of employees."""
163-
paging: Optional[Paging] = None
163+
paging: Paging
164164

165165
@override
166166
def _get_page_items(self) -> List[_T]:
@@ -172,7 +172,7 @@ def _get_page_items(self) -> List[_T]:
172172
@override
173173
def next_page_info(self) -> Optional[PageInfo]:
174174
offset = None
175-
if self.paging is not None:
175+
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
176176
if self.paging.offset is not None:
177177
offset = self.paging.offset
178178
if offset is None:
@@ -182,7 +182,7 @@ def next_page_info(self) -> Optional[PageInfo]:
182182
current_count = offset + length
183183

184184
count = None
185-
if self.paging is not None:
185+
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
186186
if self.paging.count is not None:
187187
count = self.paging.count
188188
if count is None:
@@ -196,7 +196,7 @@ def next_page_info(self) -> Optional[PageInfo]:
196196

197197
class SyncPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
198198
data: List[_T]
199-
paging: Optional[Paging] = None
199+
paging: Paging
200200

201201
@override
202202
def _get_page_items(self) -> List[_T]:
@@ -208,7 +208,7 @@ def _get_page_items(self) -> List[_T]:
208208
@override
209209
def next_page_info(self) -> Optional[PageInfo]:
210210
offset = None
211-
if self.paging is not None:
211+
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
212212
if self.paging.offset is not None:
213213
offset = self.paging.offset
214214
if offset is None:
@@ -218,7 +218,7 @@ def next_page_info(self) -> Optional[PageInfo]:
218218
current_count = offset + length
219219

220220
count = None
221-
if self.paging is not None:
221+
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
222222
if self.paging.count is not None:
223223
count = self.paging.count
224224
if count is None:
@@ -232,7 +232,7 @@ def next_page_info(self) -> Optional[PageInfo]:
232232

233233
class AsyncPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
234234
data: List[_T]
235-
paging: Optional[Paging] = None
235+
paging: Paging
236236

237237
@override
238238
def _get_page_items(self) -> List[_T]:
@@ -244,7 +244,7 @@ def _get_page_items(self) -> List[_T]:
244244
@override
245245
def next_page_info(self) -> Optional[PageInfo]:
246246
offset = None
247-
if self.paging is not None:
247+
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
248248
if self.paging.offset is not None:
249249
offset = self.paging.offset
250250
if offset is None:
@@ -254,7 +254,7 @@ def next_page_info(self) -> Optional[PageInfo]:
254254
current_count = offset + length
255255

256256
count = None
257-
if self.paging is not None:
257+
if self.paging is not None: # pyright: ignore[reportUnnecessaryComparison]
258258
if self.paging.count is not None:
259259
count = self.paging.count
260260
if count is None:

0 commit comments

Comments
 (0)