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

Update tests #18

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.36%.

Quality metrics Before After Change
Complexity 0.00 ⭐ 0.00 ⭐ 0.00
Method Length 165.32 😞 169.27 😞 3.95 👎
Working memory 2.48 ⭐ 2.49 ⭐ 0.01 👎
Quality 61.54% 🙂 61.18% 🙂 -0.36% 👎
Other metrics Before After Change
Lines 7168 7275 107
Changed files Quality Before Quality After Quality Change
tests/test_binary_sensors.py 68.66% 🙂 68.06% 🙂 -0.60% 👎
tests/test_binary_sensors_v2.py 68.66% 🙂 68.06% 🙂 -0.60% 👎
tests/test_button.py 62.07% 🙂 61.62% 🙂 -0.45% 👎
tests/test_button_v2.py 62.07% 🙂 61.62% 🙂 -0.45% 👎
tests/test_client.py 82.09% ⭐ 81.25% ⭐ -0.84% 👎
tests/test_client_v2.py 82.03% ⭐ 81.19% ⭐ -0.84% 👎
tests/test_config_flow.py 67.59% 🙂 67.10% 🙂 -0.49% 👎
tests/test_config_flow_v2.py 67.59% 🙂 67.10% 🙂 -0.49% 👎
tests/test_diagnostics.py 61.76% 🙂 61.69% 🙂 -0.07% 👎
tests/test_diagnostics_v2.py 62.03% 🙂 61.94% 🙂 -0.09% 👎
tests/test_light.py 56.39% 🙂 56.10% 🙂 -0.29% 👎
tests/test_light_v2.py 58.02% 🙂 57.63% 🙂 -0.39% 👎
tests/test_number.py 56.01% 🙂 55.86% 🙂 -0.15% 👎
tests/test_number_v2.py 58.78% 🙂 58.58% 🙂 -0.20% 👎
tests/test_select.py 56.19% 🙂 56.01% 🙂 -0.18% 👎
tests/test_select_v2.py 56.66% 🙂 56.46% 🙂 -0.20% 👎
tests/test_sensors.py 54.43% 🙂 54.30% 🙂 -0.13% 👎
tests/test_sensors_v2.py 55.58% 🙂 55.40% 🙂 -0.18% 👎
tests/test_switch.py 56.41% 🙂 56.24% 🙂 -0.17% 👎
tests/test_switch_v2.py 55.19% 🙂 55.12% 🙂 -0.07% 👎
tests/test_system_health.py 88.31% ⭐ 87.62% ⭐ -0.69% 👎
tests/test_updater.py 81.77% ⭐ 80.55% ⭐ -1.22% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
tests/test_number.py test_new_effect_property 0 ⭐ 591 ⛔ 50.30% 🙂 Try splitting into smaller methods
tests/test_sensors.py test_update_device_sensors 0 ⭐ 561 ⛔ 50.40% 🙂 Try splitting into smaller methods
tests/test_select.py test_new_effect_property 0 ⭐ 549 ⛔ 50.45% 🙂 Try splitting into smaller methods
tests/test_switch.py test_new_effect_property 0 ⭐ 519 ⛔ 50.61% 🙂 Try splitting into smaller methods
tests/test_select.py test_update_audio_devices 0 ⭐ 459 ⛔ 51.11% 🙂 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!