8000
Skip to content

Fix blacken-docs linting and apply machine.PWM optional import from #221#222

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-linting-issue-221
Closed

Fix blacken-docs linting and apply machine.PWM optional import from #221#222
Copilot wants to merge 2 commits intomainfrom
copilot/fix-linting-issue-221

Conversation

Copy link
Copy Markdown
Copilot AI commented Mar 3, 2026

PR #221 was blocked by a blacken-docs pre-commit failure unrelated to its diff, plus it needed the snippet change to land.

Changes

  • belay/snippets/convenience_imports_micropython.py: Wrap machine.PWM import in try/except ImportError — STM32 and other ports that omit PWM would raise ImportError on device connect.
# Before
from machine import Pin, PWM, Timer

# After
from machine import Pin, Timer
try:
    from machine import PWM
except ImportError:
    pass
  • docs/source/Proxy Objects.rst: Reformat multiline device("""...""") call to satisfy blacken-docs (opening """ on same line as call, closing """) collapsed).

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…et fix

Co-authored-by: BrianPugh <14318576+BrianPugh@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix linting issues in pull request #221 Fix blacken-docs linting and apply machine.PWM optional import from #221 Mar 3, 2026
@BrianPugh BrianPugh closed this Mar 3, 2026
@codecov
Copy link
Copy Markdown
codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.62%. Comparing base (acbc18f) to head (af6145b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #222   +/-   ##
=======================================
  Coverage   71.62%   71.62%           
=======================================
  Files          48       48           
  Lines        3027     3027           
  Branches      479      479           
=======================================
  Hits         2168     2168           
  Misses        744      744           
  Partials      115      115           
Flag Coverage Δ
unittests 71.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

0