Skip to content

Fix environment-controlled board detection - #420

Open
ladyada-eagleclaw wants to merge 6 commits into
mainfrom
fix-os-environ-board
Open

ladyada-eagleclaw wants to merge 6 commits into
mainfrom
fix-os-environ-board

Conversation

@ladyada-eagleclaw

@ladyada-eagleclaw ladyada-eagleclaw commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Detector().board.os_environ_board incorrectly returns False for supported USB bridges. The property accesses self.board even though self is already a Board; the resulting attribute error is masked by the dynamic board-name lookup.

Use self.<board ID> throughout the existing generator, including the MCP2222 entry now on main, and correct ITSYBITY_U2IF to ITSYBITSY_U2IF. The diff is limited to this helper correction and its regression tests.

Validation: all 26 unit tests and affected pre-commit hooks pass. Regression coverage checks MCP2221, MCP2222, FT232H, and ItsyBitsy U2IF, plus an unrelated board that must remain false. Local checks use Python 3.11 and a temporary Windows lint exception for existing Unix-only os.uname references; repository hook configuration is unchanged.

ladyada-eagleclaw and others added 3 commits October 28, 2026 15:27
Co-authored-by: Limor Fried <ladyada@users.noreply.github.com>
Co-authored-by: Limor Fried <ladyada@users.noreply.github.com>
Base MCP2222 support on the dedicated board-helper fix and keep its regression tests in that change.

Co-authored-by: Limor Fried <ladyada@users.noreply.github.com>
@ladyada
ladyada requested review from brentru and a balanced review from Copilot October 28, 2026 19:38

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Add opt-in MCP2222 USB bridge detection
Remove the MCP2222 changes merged into this branch through PR #419. They are now proposed independently against main in PR #421.

Co-authored-by: Limor Fried <ladyada@users.noreply.github.com>
@ladyada
ladyada requested a review from makermelissa October 28, 2026 19:45
Apply the environment-board helper correction to MCP2222 as well and include it in regression coverage.

Co-authored-by: Limor Fried <ladyada@users.noreply.github.com>
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