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

fix:bug in serverinfo #73

Closed starlightknown closed 3 years ago

starlightknown commented 3 years ago

closes #ISSUE-NO

What does this PR do?

Some Description of Task to be completed?

How can this be manually tested?

Any background context you want to provide?

What is the relevant issue link?

Screenshots (if appropriate here)

Any Questions you have:

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 3.30%.

Quality metrics Before After Change
Complexity 4.75 ⭐ 5.25 ⭐ 0.50 👎
Method Length 75.50 🙂 72.50 🙂 -3.00 👍
Working memory 11.23 😞 10.07 😞 -1.16 👍
Quality 59.66% 🙂 62.96% 🙂 3.30% 👍
Other metrics Before After Change
Lines 134 104 -30
Changed files Quality Before Quality After Quality Change
cogs/server.py 59.66% 🙂 62.96% 🙂 3.30% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
cogs/server.py serverinfo.check 15 🙂 152 😞 14 😞 42.03% 😞 Try splitting into smaller methods. Extract out complex expressions
cogs/server.py serverinfo.whois 1 ⭐ 143 😞 11 😞 60.78% 🙂 Try splitting into smaller methods. Extract out complex expressions
cogs/server.py serverinfo.serverinfo 1 ⭐ 145 😞 7 🙂 69.07% 🙂 Try splitting into smaller methods
cogs/server.py serverinfo.ping 0 ⭐ 46 ⭐ 11 😞 75.23% ⭐ 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.