edit-distance icon indicating copy to clipboard operation
edit-distance copied to clipboard

Sourcery refactored main branch

Open sourcery-ai[bot] opened this issue 2 years ago • 1 comments

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] avatar Apr 20 '22 03:04 sourcery-ai[bot]

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.14%.

Quality metrics Before After Change
Complexity 8.40 ⭐ 8.40 ⭐ 0.00
Method Length 67.52 🙂 67.52 🙂 0.00
Working memory 10.44 😞 10.52 😞 0.08 👎
Quality 59.48% 🙂 59.34% 🙂 -0.14% 👎
Other metrics Before After Change
Lines 386 386 0
Changed files Quality Before Quality After Quality Change
edit_distance.py 58.05% 🙂 57.90% 🙂 -0.15% 👎
test/speed.py 85.14% ⭐ 85.02% ⭐ -0.12% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
edit_distance.py edit_distance_backpointer 16 🙂 327 ⛔ 18 ⛔ 26.69% 😞 Try splitting into smaller methods. Extract out complex expressions
edit_distance.py edit_distance 18 🙂 272 ⛔ 16 ⛔ 28.83% 😞 Try splitting into smaller methods. Extract out complex expressions
edit_distance.py lowest_cost_action 9 🙂 95 🙂 13 😞 55.71% 🙂 Extract out complex expressions
edit_distance.py highest_match_action 9 🙂 97 🙂 12 😞 57.00% 🙂 Extract out complex expressions
edit_distance.py get_opcodes_from_bp_table 7 ⭐ 150 😞 9 🙂 58.08% 🙂 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!

sourcery-ai[bot] avatar Apr 20 '22 03:04 sourcery-ai[bot]