-
Notifications
You must be signed in to change notification settings - Fork 1
tooling: Enable ruff A, B, E722, and PERF rules. #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -469,10 +469,10 @@ def reset(self): | |||||||||||
| def soft_reset(self): | ||||||||||||
| return self.execute_control_word(BQ27441_CONTROL_SOFT_RESET) | ||||||||||||
|
|
||||||||||||
| # Read a 16 - bit command word from the BQ27441-G1A, def format = little endian int16 | ||||||||||||
| def read_word(self, sub_address, format="<h"): | ||||||||||||
| # Read a 16-bit command word from the BQ27441-G1A, default fmt = little-endian int16 | ||||||||||||
| def read_word(self, sub_address, fmt="<h"): | ||||||||||||
|
||||||||||||
| def read_word(self, sub_address, fmt="<h"): | |
| def read_word(self, sub_address, fmt="<h", **kwargs): | |
| # Backward compatibility: accept legacy 'format=' keyword argument | |
| if "format" in kwargs: | |
| fmt = kwargs["format"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APDS9960InvalidDevId.__init__renamed the parameter fromidtodevice_id. If any external code instantiates this exception using theid=keyword, it will now fail. Consider accepting the old keyword as an alias (with a deprecation note) or documenting this as an intentional API break.