SAGIRI-kawaii / sagiri-bot

基于Graia Ariadne和Mirai的QQ机器人 SAGIRI-BOT
GNU Affero General Public License v3.0
696 stars 83 forks source link

:bug: Multiple patches #392

Closed nullqwertyuiop closed 1 year ago

nullqwertyuiop commented 1 year ago

Close #391

Signed-off-by: nullqwertyuiop null@member.fsf.org

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 6.66 ⭐ 8.65 🙂 1.99 👎
Method Length 86.41 🙂 89.41 🙂 3.00 👎
Working memory 6.60 🙂 7.21 🙂 0.61 👎
Quality 62.25% 🙂 58.84% 🙂 -3.41% 👎
Other metrics Before After Change
Lines 216 230 14
Changed files Quality Before Quality After Quality Change
main.py 73.06% 🙂 75.01% ⭐ 1.95% 👍
shared/utils/tui.py 55.40% 🙂 49.43% 😞 -5.97% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
shared/utils/tui.py process_info 24 😞 200 😞 19 ⛔ 26.23% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
shared/utils/tui.py set_config 15 🙂 239 ⛔ 38.10% 😞 Try splitting into smaller methods
main.py group_message_handler 0 ⭐ 69 🙂 11 😞 71.61% 🙂 Extract out complex expressions
main.py temp_message_listener 0 ⭐ 69 🙂 10 😞 73.51% 🙂 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!