Skip to content

BF: Use expanding lists to avoid index errors with buttonboxes and sensors#7458

Merged
TEParsons merged 1 commit intopsychopy:devfrom
TEParsons:dev-bf-expanding-list
Nov 5, 2025
Merged

BF: Use expanding lists to avoid index errors with buttonboxes and sensors#7458
TEParsons merged 1 commit intopsychopy:devfrom
TEParsons:dev-bf-expanding-list

Conversation

@TEParsons
Copy link
Copy Markdown
Contributor

@TEParsons TEParsons commented Nov 3, 2025

Currently we're relying on the user supplying the correct number of channels for a device (number of buttons for button box, number of sensors for light/sound sensor). If we receive a message from the device with an index higher than the number of channels, we get an index error.

This PR means that the lists storing states for these channels can expand as needed, and blank space will be filled with None.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 75.86207% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.95%. Comparing base (197b724) to head (b807283).
⚠️ Report is 101 commits behind head on dev.

Additional details and impacted files
@@             Coverage Diff             @@
##              dev    #7458       +/-   ##
===========================================
+ Coverage   36.43%   48.95%   +12.51%     
===========================================
  Files         352      352               
  Lines       64852    64928       +76     
===========================================
+ Hits        23629    31784     +8155     
+ Misses      41223    33144     -8079     
Components Coverage Δ
app ∅ <ø> (∅)
boilerplate ∅ <ø> (∅)
library ∅ <ø> (∅)
vm-safe library ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TEParsons TEParsons requested a review from mdcutone November 5, 2025 14:33
@TEParsons TEParsons merged commit 23a42fa into psychopy:dev Nov 5, 2025
6 checks passed
@TEParsons TEParsons deleted the dev-bf-expanding-list branch November 6, 2025 13:50
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