OreosLab / checkinpanel

一个主要运行在 𝐞𝐥𝐞𝐜𝐕𝟐𝐏 或 𝐪𝐢𝐧𝐠𝐥𝐨𝐧𝐠 等定时面板,同时支持系统运行环境的签到项目(环境:𝑷𝒚𝒕𝒉𝒐𝒏 3.8+ / 𝑵𝒐𝒅𝒆.𝒋𝒔 10+ / 𝑩𝒂𝒔𝒉 4+ / 𝑶𝒑𝒆𝒏𝑱𝑫𝑲8 / 𝑷𝒆𝒓𝒍5)
https://oreos.ml/checkinpanel/2021-10-01-Checkinpanel.html
MIT License
1.41k stars 362 forks source link

Sourcery refactored master branch #150

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 increase code quality in the affected files by 0.19%.

Quality metrics Before After Change
Complexity 8.17 ⭐ 7.89 ⭐ -0.28 👍
Method Length 79.48 🙂 78.87 🙂 -0.61 👍
Working memory 9.74 🙂 9.74 🙂 0.00
Quality 61.63% 🙂 61.82% 🙂 0.19% 👍
Other metrics Before After Change
Lines 7452 7208 -244
Changed files Quality Before Quality After Quality Change
api_hax.py 67.69% 🙂 67.60% 🙂 -0.09% 👎
api_leetcode.py 74.37% 🙂 71.43% 🙂 -2.94% 👎
api_motto.py 84.12% ⭐ 87.73% ⭐ 3.61% 👍
api_news.py 52.90% 🙂 53.72% 🙂 0.82% 👍
api_ran_time.py 82.08% ⭐ 83.77% ⭐ 1.69% 👍
api_rssbot.py 35.29% 😞 35.37% 😞 0.08% 👍
api_weather.py 44.07% 😞 44.78% 😞 0.71% 👍
ck_acfun.py 72.05% 🙂 72.83% 🙂 0.78% 👍
ck_airport.py 50.16% 🙂 51.32% 🙂 1.16% 👍
ck_baidu_url_submit.py 70.64% 🙂 72.10% 🙂 1.46% 👍
ck_bilibili.py 48.38% 😞 46.98% 😞 -1.40% 👎
ck_ccava.py 87.59% ⭐ 88.30% ⭐ 0.71% 👍
ck_cloud189.py 57.38% 🙂 57.30% 🙂 -0.08% 👎
ck_csdn.py 76.03% ⭐ 77.22% ⭐ 1.19% 👍
ck_duokan.py 66.44% 🙂 66.68% 🙂 0.24% 👍
ck_enshan.py 85.03% ⭐ 85.15% ⭐ 0.12% 👍
ck_euserv.py 48.47% 😞 50.40% 🙂 1.93% 👍
ck_everphoto.py 72.25% 🙂 73.81% 🙂 1.56% 👍
ck_fmapp.py 71.77% 🙂 71.94% 🙂 0.17% 👍
ck_freenom.py 56.53% 🙂 56.60% 🙂 0.07% 👍
ck_game163.py 90.09% ⭐ 90.93% ⭐ 0.84% 👍
ck_glados.py 68.69% 🙂 68.32% 🙂 -0.37% 👎
ck_haidilao.py 65.36% 🙂 65.19% 🙂 -0.17% 👎
ck_heytap.py 41.51% 😞 41.69% 😞 0.18% 👍
ck_hifini.py 82.80% ⭐ 82.95% ⭐ 0.15% 👍
ck_hlx.py 73.92% 🙂 74.34% 🙂 0.42% 👍
ck_hostloc.py 77.12% ⭐ 76.91% ⭐ -0.21% 👎
ck_jegotrip.py 71.93% 🙂 73.45% 🙂 1.52% 👍
ck_juejin.py 84.42% ⭐ 84.89% ⭐ 0.47% 👍
ck_kgqq.py 39.77% 😞 39.77% 😞 0.00%
ck_meizu.py 62.35% 🙂 62.09% 🙂 -0.26% 👎
ck_mimotion.py 62.00% 🙂 61.34% 🙂 -0.66% 👎
ck_music163.py 63.60% 🙂 66.45% 🙂 2.85% 👍
ck_nga.py 61.70% 🙂 61.99% 🙂 0.29% 👍
ck_oneplusbbs.py 64.61% 🙂 64.58% 🙂 -0.03% 👎
ck_picacomic.py 70.09% 🙂 71.87% 🙂 1.78% 👍
ck_pojie.py 82.90% ⭐ 82.77% ⭐ -0.13% 👎
ck_sfacg.py 67.75% 🙂 67.76% 🙂 0.01% 👍
ck_site.py 41.39% 😞 41.64% 😞 0.25% 👍
ck_tieba.py 69.93% 🙂 70.49% 🙂 0.56% 👍
ck_toolu.py 87.18% ⭐ 88.15% ⭐ 0.97% 👍
ck_v2ex.py 59.50% 🙂 59.47% 🙂 -0.03% 👎
ck_weibo.py 69.91% 🙂 71.21% 🙂 1.30% 👍
ck_wps.py 64.18% 🙂 64.22% 🙂 0.04% 👍
ck_www2nzz.py 71.23% 🙂 74.64% 🙂 3.41% 👍
ck_wzyd.py 81.02% ⭐ 80.36% ⭐ -0.66% 👎
ck_youdao.py 62.07% 🙂 62.47% 🙂 0.40% 👍
ck_zhiyoo.py 71.52% 🙂 74.92% 🙂 3.40% 👍
notify_mtr.py 65.02% 🙂 64.85% 🙂 -0.17% 👎
notify_mtr_env.py 58.95% 🙂 58.70% 🙂 -0.25% 👎
utils_env.py 69.80% 🙂 68.51% 🙂 -1.29% 👎
utils_ver.py 80.08% ⭐ 79.16% ⭐ -0.92% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
ck_bilibili.py BiliBili.main 57 ⛔ 603 ⛔ 27 ⛔ 3.69% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
ck_heytap.py Heytap.do_task_and_draw 49 ⛔ 434 ⛔ 23 ⛔ 6.91% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
ck_site.py Site.signin 37 ⛔ 597 ⛔ 18 ⛔ 12.26% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
ck_heytap.py Heytap.daily_viewgoods 36 ⛔ 252 ⛔ 16 ⛔ 19.74% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
ck_heytap.py Heytap.daily_bonus 30 😞 272 ⛔ 17 ⛔ 20.40% ⛔ Refactor to reduce nesting. 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!