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

Master #42

Closed starlightknown closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 54.15 ⛔ 57.03 ⛔ 2.88 👎
Method Length 86.47 🙂 89.37 🙂 2.90 👎
Working memory 16.07 ⛔ 16.33 ⛔ 0.26 👎
Quality 37.94% 😞 36.46% 😞 -1.48% 👎
Other metrics Before After Change
Lines 1701 1627 -74
Changed files Quality Before Quality After Quality Change
bot.py 30.62% 😞 30.61% 😞 -0.01% 👎
cogs/fact.py 32.82% 😞 32.80% 😞 -0.02% 👎
cogs/fun.py 49.20% 😞 52.07% 🙂 2.87% 👍
cogs/general.py 72.06% 🙂 72.96% 🙂 0.90% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
bot.py new 192 ⛔ 993 ⛔ 24 ⛔ 2.24% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
bot.py edit_selector 67 ⛔ 411 ⛔ 20 ⛔ 6.48% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
bot.py edit_reaction 51 ⛔ 402 ⛔ 22 ⛔ 7.33% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
bot.py on_raw_reaction_add 50 ⛔ 234 ⛔ 18 ⛔ 15.12% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
bot.py cleandb 35 ⛔ 322 ⛔ 15 😞 18.62% ⛔ 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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.