Skip to content

bq27441: Migrate camelCase methods to snake_case.#138

Merged
nedseb merged 1 commit intomainfrom
fix/bq27441-snake-case
Mar 15, 2026
Merged

bq27441: Migrate camelCase methods to snake_case.#138
nedseb merged 1 commit intomainfrom
fix/bq27441-snake-case

Conversation

@nedseb
Copy link
Copy Markdown
Contributor

@nedseb nedseb commented Mar 15, 2026

Closes #133

Summary

Rename all 28 camelCase methods, instance variables, and local variables to snake_case.

Methods renamed

Before After
GPOUTPolarity() gpout_polarity()
setGPOUTPolarity() set_gpout_polarity()
GPOUTFunction() gpout_function()
setGPOUTFunction() set_gpout_function()
SOC1SetThreshold() soc1_set_threshold()
SOC1ClearThreshold() soc1_clear_threshold()
setSOC1Thresholds() set_soc1_thresholds()
SOCFSetThreshold() socf_set_threshold()
SOCFClearThreshold() socf_clear_threshold()
setSOCFThresholds() set_socf_thresholds()
socFlag() soc_flag()
socfFlag() socf_flag()
sociDelta() soci_delta()
setSOCIDelta() set_soci_delta()
pulseGPOUT() pulse_gpout()
deviceType() device_type()
enterConfig() enter_config()
exitConfig() exit_config()
opConfig() op_config()
writeOpConfig() write_op_config()
softReset() soft_reset()
readWord() read_word()
readControlWord() read_control_word()
executeControlWord() execute_control_word()
blockDataControl() block_data_control()
blockDataClass() block_data_class()
blockDataOffset() block_data_offset()
blockDataChecksum() block_data_checksum()
readBlockData() read_block_data()
writeBlockData() write_block_data()
computeBlockChecksum() compute_block_checksum()
writeBlockChecksum() write_block_checksum()
readExtendedData() read_extended_data()
writeExtendedData() write_extended_data()

Also renamed instance variables (_userConfigControl_user_config_control, _sealFlag_seal_flag) and all local variables to snake_case.

No backward-compatibility aliases.

Test plan

python3 -m pytest tests/ -k "bq27441 and mock" -v  # 7 passed

@nedseb nedseb self-assigned this Mar 15, 2026
@nedseb nedseb added the enhancement New feature or request label Mar 15, 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

Renames all camelCase methods, instance variables, and local variables in the BQ27441 driver to snake_case, as tracked in issue #133.

Changes:

  • Renamed ~30 public/private methods from camelCase to snake_case (e.g., deviceType()device_type())
  • Renamed instance variables (_userConfigControl_user_config_control, _sealFlag_seal_flag) and all local variables to snake_case
  • Fixed minor typos in comments (funcitonfunction, bq27442bq27441)

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

Comment thread lib/bq27441/bq27441/device.py
@nedseb nedseb merged commit 33fc9ea into main Mar 15, 2026
7 checks passed
@nedseb nedseb deleted the fix/bq27441-snake-case branch March 15, 2026 07:17
@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.

bq27441: Migrate camelCase methods to snake_case.

2 participants