Skip to content

Show the actual selection shape in the contact-slicing error - #481

Open
evadiva3 wants to merge 1 commit into
SpikeInterface:mainfrom
evadiva3:fix/probeinterface-1-missing-f-string-prefix
Open

evadiva3 wants to merge 1 commit into
SpikeInterface:mainfrom
evadiva3:fix/probeinterface-1-missing-f-string-prefix

Conversation

@evadiva3

Copy link
Copy Markdown

Passing a boolean selection with the wrong length to Probe.get_slice() prints literal {selection.shape} and {n} in the assertion message. Only the first of two adjacent strings is an f-string.

Use one f-string so the message includes the supplied shape and contact count.

Validation: pytest tests/test_probe.py — 21 passed. A direct call with a one-element selection on a two-contact probe reports (1,) != 2.

@alejoe91

Copy link
Copy Markdown
Member

Thanks!

@alejoe91

Copy link
Copy Markdown
Member

@evadiva3 can you flag the "Allow edits by maintainers"? The pre-commit reformatting service was not able to push the fixes.

@evadiva3
evadiva3 force-pushed the fix/probeinterface-1-missing-f-string-prefix branch from 701b111 to 5f3af12 Compare November 17, 2026 17:33
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.

2 participants