pablosambuco / caststatusserver

Web app for playing status and basic control of all the chromecast devices in your local network
MIT License
1 stars 0 forks source link

Sourcery refactored main branch #26

Closed sourcery-ai[bot] closed 2 years ago

sourcery-ai[bot] commented 3 years ago

Branch main refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the main branch, then run:

git fetch origin sourcery/main
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.18 ⭐ 4.94 ⭐ -0.24 👍
Method Length 44.50 ⭐ 43.82 ⭐ -0.68 👍
Working memory 6.88 🙂 6.91 🙂 0.03 👎
Quality 75.71% 76.04% 0.33% 👍
Other metrics Before After Change
Lines 442 430 -12
Changed files Quality Before Quality After Quality Change
caststatusserver.py 75.71% ⭐ 76.04% ⭐ 0.33% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
caststatusserver.py get_attribs 9 🙂 149 😞 9 🙂 56.30% 🙂 Try splitting into smaller methods
caststatusserver.py CastStatusServer.set_state 8 ⭐ 87 🙂 11 😞 61.09% 🙂 Extract out complex expressions
caststatusserver.py CastStatusServer.__init__ 4 ⭐ 117 🙂 10 😞 62.78% 🙂 Extract out complex expressions

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!