Skip to content

Commit

Permalink
Resolved mypy's complain on next() use on iterable by building an ite…
Browse files Browse the repository at this point in the history
…rator from it
  • Loading branch information
rpopov committed Dec 26, 2024
1 parent a7b010b commit fabdf7c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def select_records(
all_data: Iterable[Mapping[str, Any]] = self.extractor.extract_records(response)

response_root_iterator = self.response_root_extractor.extract_records(response)
stream_state.update({STREAM_SLICE_RESPONSE_ROOT_KEY: next(response_root_iterator, None)})
stream_state.update({STREAM_SLICE_RESPONSE_ROOT_KEY: next(iter(response_root_iterator), None)})
try:
yield from self.filter_and_transform(
all_data, stream_state, records_schema, stream_slice, next_page_token
Expand Down

0 comments on commit fabdf7c

Please sign in to comment.