Skip to content

Fix static annotation of pi.generate_multi_columns_probe - #385

Merged
samuelgarcia merged 1 commit into
SpikeInterface:mainfrom
MGAMZ:main
Dec 8, 2025
Merged

samuelgarcia merged 1 commit into
SpikeInterface:mainfrom
MGAMZ:main

Conversation

@MGAMZ

@MGAMZ MGAMZ commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

pi.generate_multi_columns_probe can receive list[int] as num_contact_per_column. And by default, an int value will be automatically converted to list[int].

if isinstance(num_contact_per_column, int):
    num_contact_per_column = [num_contact_per_column] * num_columns

So changing the static annotation of num_contact_per_column.

Copilot AI review requested due to automatic review settings December 4, 2025 01:30

Copilot AI left a comment

Copy link
Copy Markdown

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 corrects the type annotation for the num_contact_per_column parameter in generate_multi_columns_probe to accurately reflect that it accepts both int and list[int] types. The function has always supported list input (with automatic conversion from int to list), and this change aligns the type hint with the actual implementation.

Key Changes:

  • Updated type annotation from int to int | list[int] for the num_contact_per_column parameter

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

@samuelgarcia

Copy link
Copy Markdown
Member

Thank you.

@samuelgarcia
samuelgarcia merged commit 749fb4b into SpikeInterface:main Dec 8, 2025
14 of 15 checks passed
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