Closed sourcery-ai[bot] closed 2 years ago
Merging this PR leaves code quality unchanged.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 15.54 🙂 | 15.44 🙂 | -0.10 👍 |
Method Length | 89.12 🙂 | 88.96 🙂 | -0.16 👍 |
Working memory | 9.90 😞 | 9.92 😞 | 0.02 👎 |
Quality | 53.40% 🙂 | 53.40% 🙂 | 0.00% |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 3920 | 3902 | -18 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
hikka/loader.py | 54.90% 🙂 | 55.21% 🙂 | 0.31% 👍 |
hikka/utils.py | 59.87% 🙂 | 59.51% 🙂 | -0.36% 👎 |
hikka/modules/help.py | 25.10% 😞 | 25.11% 😞 | 0.01% 👍 |
hikka/modules/hikka_config.py | 51.70% 🙂 | 51.70% 🙂 | 0.00% |
hikka/modules/hikka_settings.py | 56.30% 🙂 | 56.38% 🙂 | 0.08% 👍 |
hikka/modules/python.py | 65.30% 🙂 | 66.21% 🙂 | 0.91% 👍 |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
hikka/modules/help.py | HelpMod.helpcmd | 63 ⛔ | 526 ⛔ | 22 ⛔ | 4.91% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
hikka/utils.py | answer | 54 ⛔ | 395 ⛔ | 14 😞 | 13.69% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
hikka/loader.py | Modules.unload_module | 32 😞 | 285 ⛔ | 16 ⛔ | 19.93% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
hikka/utils.py | smart_split | 22 😞 | 340 ⛔ | 15 😞 | 24.95% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
hikka/modules/hikka_settings.py | HikkaSettingsMod.watchercmd | 22 😞 | 309 ⛔ | 14 😞 | 27.03% 😞 | 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!
Help us improve this quality report!
Pull Request #45 refactored by Sourcery.
If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.
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:
Review changes via command line
To manually merge these changes, make sure you're on the
v1.2.10
branch, then run:Help us improve this pull request!