jmccrohan / pysolarmanv5

A python module to interact with Solarman Data Logging Sticks
MIT License
116 stars 25 forks source link

Fix linter findings #54

Closed sofkaski closed 2 months ago

sofkaski commented 2 months ago

This PR is stacked on top of #53

This PR has changes:

  1. Move linter configuration to pyproject.toml out of Makefile. Also disabled the linter rule format in favor of black
  2. Changes to address linter findings. They are split in 3 commits:
    1. Miscellaneous linter finding fixes.
    2. Disable the linter rule invalid-overridden-method in async variant. See the commit message for rationale and possible further development.
    3. Changed logging to use the recommended lazy logging message formatting instead of f-string formatting. (note: f-string formatting could be allowed (by disabling a linter rule))

Also formatted files with make black.

Now both make lint and make black should produce clean results.

sofkaski commented 2 months ago

I have been running the sync version of this with home_assistant_solarmanin my environment successfully.

Unit tests also pass (make test).

jmccrohan commented 2 months ago

Merged. Thanks @sofkaski!

Thanks @githubDante for the review.