starlightknown / Cyberon

Cyberon- a discord bot for hackathon servers made by using discord.py
https://starlightknown.github.io/Cyberon/#/
MIT License
19 stars 12 forks source link

Revert "Sourcery refactored main branch" #85

Closed starlightknown closed 3 years ago

starlightknown commented 3 years ago

Reverts starlightknown/Cyberon#84

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 32.71 ⛔ 37.88 ⛔ 5.17 👎
Method Length 115.79 🙂 118.60 🙂 2.81 👎
Working memory 15.55 ⛔ 16.32 ⛔ 0.77 👎
Quality 37.36% 😞 35.57% 😞 -1.79% 👎
Other metrics Before After Change
Lines 3657 3885 228
Changed files Quality Before Quality After Quality Change
bot.py 67.94% 🙂 64.89% 🙂 -3.05% 👎
cogs/Config.py 33.10% 😞 32.20% 😞 -0.90% 👎
cogs/Fun.py 63.18% 🙂 62.82% 🙂 -0.36% 👎
cogs/Help.py 52.72% 🙂 47.81% 😞 -4.91% 👎
cogs/Moderation.py 16.62% ⛔ 15.56% ⛔ -1.06% 👎
cogs/Utils.py 55.98% 🙂 54.11% 🙂 -1.87% 👎
cogs/usefullTools/dbIntegration.py 62.86% 🙂 59.71% 🙂 -3.15% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
cogs/Config.py ConfigCog.server_config 78 ⛔ 913 ⛔ 42 ⛔ 0.75% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
cogs/Moderation.py ModerationCog.mute 115 ⛔ 571 ⛔ 25 ⛔ 2.23% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
cogs/Moderation.py ModerationCog.warn 83 ⛔ 560 ⛔ 26 ⛔ 2.37% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
cogs/Moderation.py ModerationCog.purgerole 85 ⛔ 429 ⛔ 21 ⛔ 4.94% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
cogs/Moderation.py ModerationCog.ban 69 ⛔ 414 ⛔ 22 ⛔ 5.24% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

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!