Closed sourcery-ai[bot] closed 2 years ago
✅ Merging this PR will increase code quality in the affected files by 0.24%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 8.26 ⭐ | 7.98 ⭐ | -0.28 👍 |
Method Length | 62.03 🙂 | 62.52 🙂 | 0.49 👎 |
Working memory | 8.43 🙂 | 8.40 🙂 | -0.03 👍 |
Quality | 66.32% 🙂 | 66.56% 🙂 | 0.24% 👍 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 1335 | 1337 | 2 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
friendly-telegram/loader.py | 72.74% 🙂 | 72.52% 🙂 | -0.22% 👎 |
friendly-telegram/database/backend.py | 67.93% 🙂 | 82.03% ⭐ | 14.10% 👍 |
friendly-telegram/database/frontend.py | 86.61% ⭐ | 91.88% ⭐ | 5.27% 👍 |
friendly-telegram/modules/loader.py | 58.11% 🙂 | 57.79% 🙂 | -0.32% 👎 |
friendly-telegram/web/auth.py | 72.97% 🙂 | 71.58% 🙂 | -1.39% 👎 |
friendly-telegram/web/config.py | 68.27% 🙂 | 63.61% 🙂 | -4.66% 👎 |
friendly-telegram/web/core.py | 52.28% 🙂 | 52.28% 🙂 | 0.00% |
friendly-telegram/web/root.py | 85.76% ⭐ | 74.46% 🙂 | -11.30% 👎 |
friendly-telegram/web/settings.py | 63.78% 🙂 | 63.78% 🙂 | 0.00% |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
friendly-telegram/modules/loader.py | LoaderMod.load_module | 42 ⛔ | 458 ⛔ | 14 😞 | 15.50% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
friendly-telegram/web/core.py | ratelimit | 22 😞 | 208 ⛔ | 15 😞 | 30.67% 😞 | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
friendly-telegram/web/core.py | ratelimit.ratelimit_middleware | 15 🙂 | 202 😞 | 15 😞 | 36.32% 😞 | Try splitting into smaller methods. Extract out complex expressions |
friendly-telegram/modules/loader.py | LoaderMod.send_module | 11 🙂 | 222 ⛔ | 15 😞 | 38.38% 😞 | Try splitting into smaller methods. Extract out complex expressions |
friendly-telegram/web/settings.py | Web.set_permission_set | 11 🙂 | 196 😞 | 12 😞 | 44.47% 😞 | 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 #60 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:
Help us improve this pull request!