SAGIRI-kawaii / sagiri-bot

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

:arrow_up: 使用 `Launart Component` 管理 alembic ; 更新 `EmojiMix` #379

Closed nullqwertyuiop closed 1 year ago

nullqwertyuiop commented 1 year ago

378

Tested on Windows 11 Python 3.10.9 latest poetry.lock

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.78 ⭐ 4.94 ⭐ -0.84 👍
Method Length 87.92 🙂 84.67 🙂 -3.25 👍
Working memory 7.89 🙂 7.24 🙂 -0.65 👍
Quality 64.55% 🙂 68.08% 🙂 3.53% 👍
Other metrics Before After Change
Lines 396 476 80
Changed files Quality Before Quality After Quality Change
core/__init__.py 60.13% 🙂 60.72% 🙂 0.59% 👍
modules/self_contained/emoji_mix/__init__.py 61.79% 🙂 65.72% 🙂 3.93% 👍
modules/self_contained/emoji_mix/util.py 83.32% ⭐ 87.41% ⭐ 4.09% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
core/__init__.py Sagiri.__init__ 7 ⭐ 248 ⛔ 10 😞 48.48% 😞 Try splitting into smaller methods. Extract out complex expressions
core/__init__.py Sagiri.install_modules 13 🙂 156 😞 10 😞 49.92% 😞 Try splitting into smaller methods. Extract out complex expressions
core/__init__.py Sagiri.initialize 7 ⭐ 187 😞 10 😞 52.54% 🙂 Try splitting into smaller methods. Extract out complex expressions
core/__init__.py Sagiri.alembic 3 ⭐ 209 ⛔ 9 🙂 56.82% 🙂 Try splitting into smaller methods
core/__init__.py Sagiri.module_operation 10 🙂 115 🙂 10 😞 57.31% 🙂 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!