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

Refactor some code #10

Merged
merged 1 commit into from
Apr 3, 2022
Merged

Refactor some code #10

merged 1 commit into from
Apr 3, 2022

Conversation

vlebourl
Copy link
Owner

@vlebourl vlebourl commented Apr 3, 2022

No description provided.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Apr 3, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 4.98 ⭐ 4.61 ⭐ -0.37 👍
Method Length 53.85 ⭐ 53.33 ⭐ -0.52 👍
Working memory 6.61 🙂 6.61 🙂 0.00
Quality 73.65% 🙂 74.19% 🙂 0.54% 👍
Other metrics Before After Change
Lines 1223 1196 -27
Changed files Quality Before Quality After Quality Change
custom_components/vesync/pyvesync/vesyncfan.py 73.65% 🙂 74.19% 🙂 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/pyvesync/vesyncfan.py VeSyncAirBypass.get_details 12 🙂 152 😞 10 😞 51.20% 🙂 Try splitting into smaller methods. Extract out complex expressions
custom_components/vesync/pyvesync/vesyncfan.py VeSyncHumid200300S.get_details 12 🙂 146 😞 10 😞 51.84% 🙂 Try splitting into smaller methods. Extract out complex expressions
custom_components/vesync/pyvesync/vesyncfan.py VeSyncAir131.change_fan_speed 13 🙂 146 😞 9 🙂 53.03% 🙂 Try splitting into smaller methods
custom_components/vesync/pyvesync/vesyncfan.py VeSyncAirBypass.change_fan_speed 11 🙂 154 😞 9 🙂 53.94% 🙂 Try splitting into smaller methods
custom_components/vesync/pyvesync/vesyncfan.py VeSyncAir131.get_details 3 ⭐ 131 😞 8 🙂 66.32% 🙂 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!

@github-actions github-actions bot added the enhancement New feature or request label Apr 3, 2022
@vlebourl vlebourl merged commit fab77a0 into main Apr 3, 2022
@vlebourl vlebourl deleted the enhancement/refactor-code branch April 3, 2022 18:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant