You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Align PwrUSB power strip with the consolidated *Capability architecture
Problem: The PwrUSB family (PR #115) was branched before master consolidated all
capability mixins into hardwarelibrary/capabilities.py and renamed them
*Control -> *Capability. The clean merge left the power strip on the old
convention: a separate hardwarelibrary/powerstrips/capabilities.py with its own
Capability base and OutletSwitchingControl/DefaultOutletControl/
CurrentMeteringControl names, plus a duplicate capabilities()/hasCapability() on
PowerStripDevice. It imported and passed tests but was inconsistent with the
rest of the library, and mixins subclassed a different Capability base than the
canonical one (so isinstance against hardwarelibrary.capabilities found nothing).
Solution: Move the three mixins into the shared hardwarelibrary/capabilities.py
as OutletSwitchingCapability, DefaultOutletCapability, and
CurrentMeteringCapability (canonical Capability base); delete
powerstrips/capabilities.py. Reduce PowerStripDevice to a pure marker like
LaserSourceDevice, inheriting capabilities()/hasCapability() from
PhysicalDevice. Update pwrusb.py bases/imports, the package __init__ re-export,
tests, the skill doc, and the CHANGELOG entry accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments