SAGIRI-kawaii / sagiri-bot

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

Update super_resolution #355

Closed miraclejzd closed 2 years ago

miraclejzd commented 2 years ago

做了一丢参数上的修改,当Image为gif时,imageio.misave的format参数应为".gif",否则会报如下错误:

QQ图片20220925015700

同时存在 len(outputs)==1 的gif,故将imageio.misave的ims参数改为outputs。

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 17.37 🙂 17.37 🙂 0.00
Method Length 357.00 ⛔ 355.50 ⛔ -1.50 👍
Working memory 8.14 🙂 8.14 🙂 0.00
Quality 28.21% 😞 28.24% 😞 0.03% 👍
Other metrics Before After Change
Lines 173 173 0
Changed files Quality Before Quality After Quality Change
sagiri_bot/handler/handlers/super_resolution/init.py 28.21% 😞 28.24% 😞 0.03% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
sagiri_bot/handler/handlers/super_resolution/init.py super_resolution 19 😞 353 ⛔ 27.37% 😞 Refactor to reduce nesting. Try splitting into smaller methods
sagiri_bot/handler/handlers/super_resolution/init.py do_super_resolution 16 🙂 358 ⛔ 15 😞 28.98% 😞 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!