mikacousin / nino

Free lighting console
GNU General Public License v3.0
0 stars 1 forks source link

Sourcery refactored main branch #1

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^
sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 20.19 😞 19.53 😞 -0.66 👍
Method Length 72.10 🙂 70.90 🙂 -1.20 👍
Working memory 12.26 😞 12.25 😞 -0.01 👍
Quality 54.06% 🙂 54.45% 🙂 0.39% 👍
Other metrics Before After Change
Lines 1282 1263 -19
Changed files Quality Before Quality After Quality Change
data/fixtures/fixtures_ascii_to_json.py 17.37% ⛔ 17.61% ⛔ 0.24% 👍
src/application.py 79.10% ⭐ 79.42% ⭐ 0.32% 👍
src/device.py 52.56% 🙂 53.52% 🙂 0.96% 👍
src/patch.py 62.06% 🙂 61.98% 🙂 -0.08% 👎
src/tab_patch.py 53.65% 🙂 54.42% 🙂 0.77% 👍
src/undo_redo.py 90.36% ⭐ 90.25% ⭐ -0.11% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
src/tab_patch.py TabPatch.output 18 🙂 230 ⛔ 15 😞 32.07% 😞 Try splitting into smaller methods. Extract out complex expressions
src/tab_patch.py update_channels_list 18 🙂 186 😞 13 😞 37.89% 😞 Try splitting into smaller methods. Extract out complex expressions
src/tab_patch.py TabPatch.test_outputs_collision 14 🙂 157 😞 18 ⛔ 38.11% 😞 Try splitting into smaller methods. Extract out complex expressions
src/tab_patch.py Fixtures.clicked 16 🙂 151 😞 15 😞 40.06% 😞 Try splitting into smaller methods. Extract out complex expressions
src/tab_patch.py FixturesLibrary.__init__ 13 🙂 267 ⛔ 11 😞 40.20% 😞 Try splitting into smaller methods. 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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.