drivers: Standardize class inheritance to class Foo(object).#63
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
|
🎉 This PR is included in version 0.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
class Foo(object):(Python 2 compatible style, project convention)Closes #60
Test plan
ruff checkpassespytest tests/ -k mock— 41 passed)