Skip to content

Comments

Added ruff formatter#130

Merged
indykoning merged 3 commits intomasterfrom
feature/ruff
Feb 2, 2026
Merged

Added ruff formatter#130
indykoning merged 3 commits intomasterfrom
feature/ruff

Conversation

@indykoning
Copy link
Owner

Summary

This PR adds the ruff formatter to format and lint the code, saving review time on formatting and linting.
This PR only introduces and runs the formatter, so no functional changes should have occurred.

Checklist

  • I've made sure the PR does small incremental changes. (new code additions are dificult to review when e.g. the entire repository got improved codestyle in the same PR.)
  • I've added/updated the relevant docs for code changes i've made.

@indykoning indykoning marked this pull request as draft February 1, 2026 15:22
@indykoning indykoning marked this pull request as ready for review February 1, 2026 16:10
@indykoning
Copy link
Owner Author

Hey @GraemeDBlue & @johanzander,
I've added the Ruff formatter from the previous PR.
Could you give it a try as well, see if the code still runs and looks as expected? 😁

Copy link
Contributor

@GraemeDBlue GraemeDBlue left a comment

Choose a reason for hiding this comment

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

@indykoning Have tested the SPH methods and they all seem to still work as expected

@indykoning indykoning merged commit c754b8f into master Feb 2, 2026
2 checks passed
@indykoning indykoning deleted the feature/ruff branch February 2, 2026 20:22
@johanzander
Copy link
Collaborator

This change breaks the min_example:

(.venv) JZANDER@GC2F7TJ7VQ PyPi_GrowattServer % python3 -m examples.min_example
Plants: Found 1 plants
Processing inverter: RKM0D7N04X
Saving inverter data to inverter_data.json
Saving energy data to energy_data.json
Unexpected error: 'NoneType' object has no attribute 'utc'
(.venv) JZANDER@GC2F7TJ7VQ PyPi_GrowattServer %

min_energy_history() has timezone as optional, but fail if it is not passed as an argument.

Not critical from my side as the HA integration does not use this specific function and everything else seem to work from my side.

Tested:

  1. min_example
  2. min_example_dashboard
  3. tlx_example
  4. tax_example_dashboard

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants