Closed sourcery-ai[bot] closed 3 years ago
❌ Merging this PR will decrease code quality in the affected files by 0.26%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 487.51 ⛔ | 512.98 ⛔ | 25.47 👎 |
Method Length | 140.60 😞 | 142.52 😞 | 1.92 👎 |
Working memory | 107.87 ⛔ | 109.31 ⛔ | 1.44 👎 |
Quality | 30.77% 😞 | 30.51% 😞 | -0.26% 👎 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 4011 | 4055 | 44 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
spunky.py | 30.77% 😞 | 30.51% 😞 | -0.26% 👎 |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
spunky.py | LogParser.handle_say | 1373 ⛔ | 13670 ⛔ | 265 ⛔ | 0.00% | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
spunky.py | LogParser.__init__ | 74 ⛔ | 1337 ⛔ | 71 ⛔ | 0.78% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
spunky.py | LogParser.handle_kill | 122 ⛔ | 902 ⛔ | 29 ⛔ | 1.08% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
spunky.py | LogParser.handle_awards | 51 ⛔ | 534 ⛔ | 41 ⛔ | 3.49% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
spunky.py | LogParser.find_game_start | 43 ⛔ | 370 ⛔ | 29 ⛔ | 7.49% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
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.
Pull Request #106 refactored by Sourcery.
Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.
To incorporate these changes, you can either:
Merge this Pull Request instead of the original, or
Ask your contributor to locally incorporate these commits and push them to the original Pull Request
Incorporate changes via command line
NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.
See our documentation here.
Run Sourcery locally
Reduce the feedback loop during development by using the Sourcery editor plugin: