Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many bugs #119

Merged
merged 4 commits into from
Mar 13, 2023
Merged

Many bugs #119

merged 4 commits into from
Mar 13, 2023

Conversation

dmamontov
Copy link
Owner

No description provided.

@sourcery-ai
Copy link

sourcery-ai bot commented Mar 13, 2023

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.17%.

Quality metrics Before After Change
Complexity 1.52 ⭐ 1.53 ⭐ 0.01 👎
Method Length 523.97 ⛔ 523.89 ⛔ -0.08 👍
Working memory 5.53 ⭐ 5.53 ⭐ 0.00
Quality 71.11% 🙂 71.28% 🙂 0.17% 👍
Other metrics Before After Change
Lines 35658 35657 -1
Changed files Quality Before Quality After Quality Change
custom_components/miwifi/__init__.py 53.28% 🙂 53.24% 🙂 -0.04% 👎
custom_components/miwifi/button.py 88.33% ⭐ 88.33% ⭐ 0.00%
custom_components/miwifi/const.py 61.38% 🙂 61.38% 🙂 0.00%
custom_components/miwifi/device_tracker.py 69.13% 🙂 69.14% 🙂 0.01% 👍
custom_components/miwifi/enum.py 92.47% ⭐ 92.77% ⭐ 0.30% 👍
custom_components/miwifi/light.py 84.37% ⭐ 84.37% ⭐ 0.00%
custom_components/miwifi/select.py 69.72% 🙂 69.71% 🙂 -0.01% 👎
custom_components/miwifi/sensor.py 64.33% 🙂 64.32% 🙂 -0.01% 👎
custom_components/miwifi/services.py 75.96% ⭐ 75.00% ⭐ -0.96% 👎
custom_components/miwifi/switch.py 79.84% ⭐ 79.84% ⭐ 0.00%
custom_components/miwifi/update.py 73.65% 🙂 73.65% 🙂 0.00%
tests/test_update.py 61.43% 🙂 61.64% 🙂 0.21% 👍
tests/test_updater_main.py 77.34% ⭐ 77.51% ⭐ 0.17% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
custom_components/miwifi/__init__.py async_setup_entry 13 🙂 269 ⛔ 38.41% 😞 Try splitting into smaller methods
custom_components/miwifi/select.py MiWifiSelect.__init__ 9 🙂 178 😞 12 😞 47.79% 😞 Try splitting into smaller methods. Extract out complex expressions
custom_components/miwifi/device_tracker.py MiWifiDeviceTracker._update_entry 12 🙂 185 😞 9 🙂 50.15% 🙂 Try splitting into smaller methods
custom_components/miwifi/device_tracker.py MiWifiDeviceTracker._handle_coordinator_update 7 ⭐ 172 😞 10 😞 53.85% 🙂 Try splitting into smaller methods. Extract out complex expressions
tests/test_update.py test_need_update 0 ⭐ 303 ⛔ 55.07% 🙂 Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

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!

@dmamontov dmamontov merged commit 8442d60 into main Mar 13, 2023
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.

1 participant