BalconyJH / nonebot_plugin_r6s

A R6s plugin for Nonebot2
GNU General Public License v3.0
10 stars 6 forks source link

Sourcery refactored master branch #14

Closed sourcery-ai[bot] closed 1 year ago

sourcery-ai[bot] commented 1 year ago

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 4.19 ⭐ 3.99 ⭐ -0.20 👍
Method Length 63.42 🙂 63.06 🙂 -0.36 👍
Working memory 6.00 ⭐ 6.15 ⭐ 0.15 👎
Quality 72.21% 🙂 71.48% 🙂 -0.73% 👎
Other metrics Before After Change
Lines 776 744 -32
Changed files Quality Before Quality After Quality Change
nonebot_plugin_r6s/__init__.py 80.06% ⭐ 79.21% ⭐ -0.85% 👎
nonebot_plugin_r6s/image.py 58.64% 🙂 59.09% 🙂 0.45% 👍
nonebot_plugin_r6s/net.py 68.02% 🙂 68.78% 🙂 0.76% 👍
nonebot_plugin_r6s/player.py 79.34% ⭐ 77.57% ⭐ -1.77% 👎
nonebot_plugin_r6s/r6s_data.py 70.72% 🙂 70.82% 🙂 0.10% 👍
nonebot_plugin_r6s/r6s_ground.py 75.45% ⭐ 75.98% ⭐ 0.53% 👍
nonebot_plugin_r6s/r6s_stats.py 83.65% ⭐ 82.07% ⭐ -1.58% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
nonebot_plugin_r6s/image.py detail_image 9 🙂 404 ⛔ 38.73% 😞 Try splitting into smaller methods
nonebot_plugin_r6s/player.py new_player_from_r6scn 10 🙂 197 😞 10 😞 48.93% 😞 Try splitting into smaller methods. Extract out complex expressions
nonebot_plugin_r6s/image.py base_image 2 ⭐ 165 😞 17 ⛔ 49.42% 😞 Try splitting into smaller methods. Extract out complex expressions
nonebot_plugin_r6s/image.py plays_image 2 ⭐ 231 ⛔ 56.89% 🙂 Try splitting into smaller methods
nonebot_plugin_r6s/r6s_data.py rank 10 🙂 128 😞 9 🙂 57.75% 🙂 Try splitting into smaller methods

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!