letterfowl / Platyrhynchos

Concatenation-based crossword generator
Other
3 stars 0 forks source link

Sourcery refactored main branch #1

Closed sourcery-ai[bot] closed 1 year ago

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

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 16.92 🙂 16.67 🙂 -0.25 👍
Method Length 61.74 🙂 61.51 🙂 -0.23 👍
Working memory 10.48 😞 10.47 😞 -0.01 👍
Quality 57.97% 🙂 58.15% 🙂 0.18% 👍
Other metrics Before After Change
Lines 486 497 11
Changed files Quality Before Quality After Quality Change
bib.py 75.71% ⭐ 75.76% ⭐ 0.05% 👍
bibTest.py 83.76% ⭐ 84.88% ⭐ 1.12% 👍
search.py 39.91% 😞 39.93% 😞 0.02% 👍
visualize.py 55.42% 🙂 56.01% 🙂 0.59% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
visualize.py gen_table 27 😞 196 😞 13 😞 31.19% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
bib.py Crossword.combine 6 ⭐ 151 😞 17 ⛔ 46.89% 😞 Try splitting into smaller methods. Extract out complex expressions
bib.py Crossword.__str__ 13 🙂 107 🙂 10 😞 55.68% 🙂 Extract out complex expressions
bib.py Crossword._check_crossings 10 🙂 56 ⭐ 10 😞 65.82% 🙂 Extract out complex expressions
bib.py Crossword.relative 0 ⭐ 79 🙂 12 😞 68.37% 🙂 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!