Aethese / Switchence

Simple Nintendo Switch rich presence app for discord.
MIT License
25 stars 6 forks source link

Sourcery refactored main branch #5

Closed sourcery-ai[bot] closed 3 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.80%.

Quality metrics Before After Change
Complexity 20.75 😞 19.20 😞 -1.55 👍
Method Length 109.10 🙂 107.45 🙂 -1.65 👍
Working memory 10.87 😞 10.81 😞 -0.06 👍
Quality 45.05% 😞 45.85% 😞 0.80% 👍
Other metrics Before After Change
Lines 446 438 -8
Changed files Quality Before Quality After Quality Change
main.py 45.05% 😞 45.85% 😞 0.80% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
main.py changePresence 14 🙂 253 ⛔ 17 ⛔ 31.91% 😞 Try splitting into smaller methods. Extract out complex expressions
main.py updateProgram 10 🙂 146 😞 7 🙂 60.26% 🙂 Try splitting into smaller methods
main.py createFiles 2 ⭐ 124 😞 5 ⭐ 75.54% ⭐ 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!