Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Refactor devices detection and classification. #55

Merged
merged 2 commits into from
Nov 8, 2022
Merged

Conversation

vlebourl
Copy link
Owner

Closes #54 .

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 24, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.98 ⭐ 3.45 ⭐ 0.47 👎
Method Length 37.15 ⭐ 35.82 ⭐ -1.33 👍
Working memory 4.85 ⭐ 4.82 ⭐ -0.03 👍
Quality 83.76% 83.07% -0.69% 👎
Other metrics Before After Change
Lines 643 620 -23
Changed files Quality Before Quality After Quality Change
custom_components/vesync/common.py 74.35% 🙂 68.52% 🙂 -5.83% 👎
custom_components/vesync/const.py 85.53% ⭐ 86.91% ⭐ 1.38% 👍
custom_components/vesync/fan.py 80.63% ⭐ 81.96% ⭐ 1.33% 👍
custom_components/vesync/humidifier.py 85.24% ⭐ 86.42% ⭐ 1.18% 👍
custom_components/vesync/number.py 90.88% ⭐ 91.42% ⭐ 0.54% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
custom_components/vesync/common.py async_process_devices 19 😞 260 ⛔ 8 🙂 41.88% 😞 Refactor to reduce nesting. 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!

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vlebourl vlebourl changed the title Add LV600s device Refactor device detection and classification. Oct 24, 2022
@vlebourl vlebourl changed the title Refactor device detection and classification. Refactor devices detection and classification. Oct 24, 2022
@vlebourl vlebourl merged commit 0b5810e into main Nov 8, 2022
@vlebourl vlebourl deleted the feature/add-lv600s branch April 18, 2023 07:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for LV600S Humidifier
1 participant