dmamontov / hass-ledfx

LedFx for Home Assistant
https://community.home-assistant.io/t/ledfx-deep-integration-component/366750
Apache License 2.0
44 stars 6 forks source link

Upgrade HASS version #20

Closed dmamontov closed 1 year ago

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.01%.

Quality metrics Before After Change
Complexity 3.32 ⭐ 3.32 ⭐ 0.00
Method Length 97.38 🙂 97.42 🙂 0.04 👎
Working memory 7.51 🙂 7.51 🙂 0.00
Quality 64.47% 🙂 64.46% 🙂 -0.01% 👎
Other metrics Before After Change
Lines 730 730 0
Changed files Quality Before Quality After Quality Change
custom_components/ledfx/__init__.py 65.43% 🙂 65.35% 🙂 -0.08% 👎
custom_components/ledfx/button.py 89.69% ⭐ 89.69% ⭐ 0.00%
custom_components/ledfx/light.py 53.33% 🙂 53.33% 🙂 0.00%
custom_components/ledfx/switch.py 70.87% 🙂 70.87% 🙂 0.00%

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
custom_components/ledfx/light.py LedFxLight._device_on 11 🙂 253 ⛔ 15 😞 36.63% 😞 Try splitting into smaller methods. Extract out complex expressions
custom_components/ledfx/light.py LedFxLight._handle_coordinator_update 2 ⭐ 262 ⛔ 15 😞 44.82% 😞 Try splitting into smaller methods. Extract out complex expressions
custom_components/ledfx/light.py LedFxLight._async_call 8 ⭐ 184 😞 12 😞 48.21% 😞 Try splitting into smaller methods. Extract out complex expressions
custom_components/ledfx/switch.py LedFxSwitch.__init__ 4 ⭐ 210 ⛔ 10 😞 53.70% 🙂 Try splitting into smaller methods. Extract out complex expressions
custom_components/ledfx/__init__.py async_setup_entry 5 ⭐ 194 😞 56.26% 🙂 Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!