Skip to content

drivers: Standardize class inheritance to class Foo(object).#63

Merged
nedseb merged 2 commits intomainfrom
fix/standardize-class-inheritance
Mar 12, 2026
Merged

drivers: Standardize class inheritance to class Foo(object).#63
nedseb merged 2 commits intomainfrom
fix/standardize-class-inheritance

Conversation

@nedseb
Copy link
Copy Markdown
Contributor

@nedseb nedseb commented Mar 12, 2026

Summary

  • Standardize all driver classes to use class Foo(object): (Python 2 compatible style, project convention)
  • Updated 6 drivers: apds9960, bq27441 (8 classes), ssd1327, vl53l1x, wsen-hids, wsen-pads

Closes #60

Test plan

  • ruff check passes
  • All mock tests pass (pytest tests/ -k mock — 41 passed)

@nedseb nedseb requested review from Charly-sketch and Copilot March 12, 2026 21:06
@nedseb nedseb self-assigned this Mar 12, 2026
@nedseb nedseb added the enhancement New feature or request label Mar 12, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Standardizes driver class declarations to consistently use Python 2–style new-style classes (class Foo(object):) across several sensor/display drivers, aligning with the repository’s documented coding convention.

Changes:

  • Updated main driver classes in apds9960, ssd1327, vl53l1x, wsen-hids, and wsen-pads to inherit from object.
  • Updated bq27441 driver and its associated “measure type” classes to inherit from object.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/wsen-pads/wsen_pads/device.py Update WSEN_PADS to class WSEN_PADS(object):.
lib/wsen-hids/wsen_hids/device.py Update WSEN_HIDS to class WSEN_HIDS(object):.
lib/vl53l1x/vl53l1x/device.py Update VL53L1X to class VL53L1X(object):.
lib/ssd1327/ssd1327/device.py Update SSD1327 to class SSD1327(object):.
lib/bq27441/bq27441/device.py Update BQ27441 and related type classes to inherit from object.
lib/apds9960/apds9960/device.py Update APDS9960 to class APDS9960(object):.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/wsen-pads/wsen_pads/device.py
@nedseb nedseb merged commit d731420 into main Mar 12, 2026
3 checks passed
@nedseb nedseb deleted the fix/standardize-class-inheritance branch March 12, 2026 21:15
@semantic-release-updater
Copy link
Copy Markdown

🎉 This PR is included in version 0.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

drivers: Standardize class inheritance to class Foo(object).

2 participants