Skip to content

Use itertools batched#653

Merged
evgeny-stakewise merged 1 commit intomasterfrom
batched
Feb 5, 2026
Merged

Use itertools batched#653
evgeny-stakewise merged 1 commit intomasterfrom
batched

Conversation

@evgeny-stakewise
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 4, 2026 21:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the custom chunkify utility function from sw_utils with Python's built-in itertools.batched function. The change modernizes the codebase by utilizing a standard library function that provides the same batching functionality.

Changes:

  • Replaced all chunkify imports with itertools.batched imports
  • Updated function signatures to use Sequence instead of list for better type flexibility
  • Removed unnecessary type ignore comment

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/validators/tasks.py Replaced chunkify with batched for validator funding batches and updated type hint to Sequence
src/validators/relayer.py Updated type hint from list to Sequence for validator fundings parameter
src/validators/keystores/hashi_vault.py Replaced three instances of chunkify with batched for key loading operations
src/validators/consensus.py Replaced chunkify with batched for validator fetching
src/common/credentials.py Replaced chunkify with batched for credential generation batches
src/commands/setup_remote_signer.py Replaced chunkify with batched and removed type ignore comment

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@evgeny-stakewise evgeny-stakewise merged commit c44b90a into master Feb 5, 2026
8 checks passed
@evgeny-stakewise evgeny-stakewise deleted the batched branch February 5, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants