Skip to content

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Apr 19, 2022

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 sourcery-ai bot requested a review from rodion-gudz April 19, 2022 06:47
c = 24
else:
c = -24
c = 24 if self.left else -24
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Player.update refactored with the following changes:

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Apr 19, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 35.54 ⛔ 34.66 ⛔ -0.88 👍
Method Length 123.29 😞 123.12 😞 -0.17 👍
Working memory 14.34 😞 14.33 😞 -0.01 👍
Quality 32.39% 😞 32.73% 😞 0.34% 👍
Other metrics Before After Change
Lines 335 331 -4
Changed files Quality Before Quality After Quality Change
main.py 32.39% 😞 32.73% 😞 0.34% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
main.py Player.update 51 ⛔ 437 ⛔ 15 😞 12.43% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
main.py LoadLvL 17 🙂 368 ⛔ 14 😞 29.26% 😞 Try splitting into smaller methods. Extract out complex expressions
main.py Lrud.__init__ 4 ⭐ 240 ⛔ 14 😞 45.21% 😞 Try splitting into smaller methods. Extract out complex expressions
main.py Lrud.update 6 ⭐ 69 🙂 11 😞 65.68% 🙂 Extract out complex expressions
main.py Player.__init__ 0 ⭐ 135 😞 9 🙂 66.64% 🙂 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant