BeautifulReport icon indicating copy to clipboard operation
BeautifulReport copied to clipboard

如果测试用例,添加了自定义得装饰器,测试报告里面对应的用例,不会显示用例描述

Open 270466585 opened this issue 4 years ago • 2 comments

@autophyte @TesterlifeRaymond @steinvenic @gcanoxl

270466585 avatar Jun 05 '20 02:06 270466585

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/code-rgb/userge-x/ahwzr818k
✅ Preview: https://userge-x-git-refactor.code-rgb.vercel.app

vercel[bot] avatar Oct 23 '20 10:10 vercel[bot]

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.57 ⭐ 5.54 ⭐ -0.03 👍
Method Length 103.56 🙂 103.06 🙂 -0.50 👍
Working memory 11.34 😞 11.30 😞 -0.04 👍
Quality 67.57% 🙂 67.72% 🙂 0.15% 👍
Other metrics Before After Change
Lines 13177 15827 2650
Changed files Quality Before Quality After Quality Change
userge/plugins/init.py 83.37% ⭐ 83.37% ⭐ 0.00%
userge/plugins/help.py 60.33% 🙂 60.35% 🙂 0.02% 👍
userge/plugins/admin/gadmin.py 38.66% 😞 38.66% 😞 0.00%
userge/plugins/admin/gban.py 62.47% 🙂 62.47% 🙂 0.00%
userge/plugins/admin/gmute.py 51.47% 🙂 51.47% 🙂 0.00%
userge/plugins/admin/locks.py 45.41% 😞 45.41% 😞 0.00%
userge/plugins/admin/privacy.py 66.35% 🙂 66.35% 🙂 0.00%
userge/plugins/admin/purge.py 50.62% 🙂 50.62% 🙂 0.00%
userge/plugins/bot/alive.py 74.06% 🙂 79.12% ⭐ 5.06% 👍
userge/plugins/bot/bot_forwards.py 68.81% 🙂 68.84% 🙂 0.03% 👍
userge/plugins/bot/bot_pm.py 65.63% 🙂 66.32% 🙂 0.69% 👍
userge/plugins/bot/buttons.py 62.92% 🙂 62.96% 🙂 0.04% 👍
userge/plugins/bot/gapps.py 58.89% 🙂 58.89% 🙂 0.00%
userge/plugins/bot/inline_help.py 72.01% 🙂 72.01% 🙂 0.00%
userge/plugins/bot/ofox.py 50.81% 🙂 50.81% 🙂 0.00%
userge/plugins/bot/opinion.py 64.32% 🙂 64.32% 🙂 0.00%
userge/plugins/bot/secret.py 78.42% ⭐ 78.50% ⭐ 0.08% 👍
userge/plugins/bot/utube_inline.py 69.03% 🙂 69.03% 🙂 0.00%
userge/plugins/fun/autopic.py 60.08% 🙂 60.08% 🙂 0.00%
userge/plugins/fun/carbon.py 2.74% ⛔ 2.74% ⛔ 0.00%
userge/plugins/fun/convert.py 79.13% ⭐ 79.13% ⭐ 0.00%
userge/plugins/fun/gen_memes.py 34.62% 😞 34.62% 😞 0.00%
userge/plugins/fun/gizoogle.py 77.41% ⭐ 77.41% ⭐ 0.00%
userge/plugins/fun/kang.py 52.91% 🙂 52.91% 🙂 0.00%
userge/plugins/fun/memes.py 72.72% 🙂 72.72% 🙂 0.00%
userge/plugins/fun/nekos.py 46.43% 😞 46.43% 😞 0.00%
userge/plugins/fun/nsfw.py 73.63% 🙂 73.63% 🙂 0.00%
userge/plugins/fun/plet.py 59.45% 🙂 59.45% 🙂 0.00%
userge/plugins/fun/quote.py 58.36% 🙂 58.36% 🙂 0.00%
userge/plugins/fun/spotify_autobio.py 62.58% 🙂 62.64% 🙂 0.06% 👍
userge/plugins/fun/stylish.py 58.82% 🙂 58.91% 🙂 0.09% 👍
userge/plugins/fun/type.py 64.35% 🙂 64.35% 🙂 0.00%
userge/plugins/fun/weebo.py 67.31% 🙂 66.98% 🙂 -0.33% 👎
userge/plugins/fun/whois.py 31.10% 😞 31.10% 😞 0.00%
userge/plugins/fun/word_counter.py 76.09% ⭐ 76.09% ⭐ 0.00%
userge/plugins/fun/x.py 65.50% 🙂 65.50% 🙂 0.00%
userge/plugins/fun/year_progress.py 76.90% ⭐ 76.90% ⭐ 0.00%
userge/plugins/misc/download.py 17.06% ⛔ 17.06% ⛔ 0.00%
userge/plugins/misc/gdrive.py 76.84% ⭐ 76.84% ⭐ 0.00%
userge/plugins/misc/instadl.py 70.07% 🙂 70.07% 🙂 0.00%
userge/plugins/misc/pathlib.py 77.31% ⭐ 77.31% ⭐ 0.00%
userge/plugins/misc/redditdl.py 60.69% 🙂 60.69% 🙂 0.00%
userge/plugins/misc/upload.py 53.78% 🙂 53.78% 🙂 0.00%
userge/plugins/misc/utube.py 57.65% 🙂 57.65% 🙂 0.00%
userge/plugins/tools/all.py 88.37% ⭐ 88.37% ⭐ 0.00%
userge/plugins/tools/cancel.py 92.68% ⭐ 92.68% ⭐ 0.00%
userge/plugins/tools/delete.py 93.26% ⭐ 93.26% ⭐ 0.00%
userge/plugins/tools/executor.py 80.49% ⭐ 80.49% ⭐ 0.00%
userge/plugins/tools/ids.py 42.22% 😞 42.22% 😞 0.00%
userge/plugins/tools/json.py 82.41% ⭐ 82.41% ⭐ 0.00%
userge/plugins/tools/logs.py 50.82% 🙂 50.82% 🙂 0.00%
userge/plugins/tools/manage.py 31.40% 😞 31.40% 😞 0.00%
userge/plugins/tools/ping.py 86.05% ⭐ 93.03% ⭐ 6.98% 👍
userge/plugins/tools/repo.py 94.58% ⭐ 94.58% ⭐ 0.00%
userge/plugins/tools/sd.py 79.76% ⭐ 79.76% ⭐ 0.00%
userge/plugins/tools/search.py 67.84% 🙂 67.84% 🙂 0.00%
userge/plugins/tools/sudo.py 67.16% 🙂 67.16% 🙂 0.00%
userge/plugins/tools/system.py 69.98% 🙂 69.98% 🙂 0.00%
userge/plugins/tools/timeout.py 79.74% ⭐ 79.74% ⭐ 0.00%
userge/plugins/tools/updater.py 61.55% 🙂 61.55% 🙂 0.00%
userge/plugins/utils/admins.py 27.71% 😞 27.71% 😞 0.00%
userge/plugins/utils/afk.py 56.70% 🙂 56.70% 🙂 0.00%
userge/plugins/utils/circle.py 26.23% 😞 26.23% 😞 0.00%
userge/plugins/utils/covid.py 45.37% 😞 45.37% 😞 0.00%
userge/plugins/utils/currency.py 49.93% 😞 49.93% 😞 0.00%
userge/plugins/utils/dic.py 44.10% 😞 44.10% 😞 0.00%
userge/plugins/utils/direct_links.py 60.89% 🙂 60.89% 🙂 0.00%
userge/plugins/utils/filters.py 65.48% 🙂 65.48% 🙂 0.00%
userge/plugins/utils/google.py 46.75% 😞 46.75% 😞 0.00%
userge/plugins/utils/hash.py 58.87% 🙂 58.87% 🙂 0.00%
userge/plugins/utils/header.py 51.60% 🙂 51.60% 🙂 0.00%
userge/plugins/utils/mediainfo.py 52.86% 🙂 67.58% 🙂 14.72% 👍
userge/plugins/utils/notes.py 66.49% 🙂 66.49% 🙂 0.00%
userge/plugins/utils/ocr.py 76.40% ⭐ 76.40% ⭐ 0.00%
userge/plugins/utils/paste.py 34.62% 😞 34.62% 😞 0.00%
userge/plugins/utils/pm_logger.py 71.17% 🙂 71.17% 🙂 0.00%
userge/plugins/utils/pmpermit.py 68.65% 🙂 68.65% 🙂 0.00%
userge/plugins/utils/removebg.py 45.56% 😞 45.56% 😞 0.00%
userge/plugins/utils/snips.py 65.91% 🙂 65.91% 🙂 0.00%
userge/plugins/utils/speedtest.py 67.89% 🙂 67.89% 🙂 0.00%
userge/plugins/utils/telegraph.py 40.93% 😞 40.93% 😞 0.00%
userge/plugins/utils/thumbnail.py 72.83% 🙂 72.83% 🙂 0.00%
userge/plugins/utils/translate.py 47.31% 😞 47.31% 😞 0.00%
userge/plugins/utils/ud.py 49.30% 😞 49.30% 😞 0.00%
userge/plugins/utils/weather.py 77.21% ⭐ 77.16% ⭐ -0.05% 👎
userge/plugins/utils/webss.py 74.23% 🙂 74.23% 🙂 0.00%
userge/plugins/utils/welcome.py 72.72% 🙂 72.72% 🙂 0.00%
userge/plugins/utils/wikipedia.py 52.54% 🙂 52.54% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
userge/plugins/help.py inline_answer 145 ⛔ 1469 ⛔ 42 ⛔ 0.14% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userge/plugins/fun/carbon.py carbon_ 53 ⛔ 730 ⛔ 52 ⛔ 2.74% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userge/plugins/fun/spotify_autobio.py spotify_biox 95 ⛔ 691 ⛔ 23 ⛔ 2.91% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userge/plugins/fun/kang.py kang_ 95 ⛔ 828 ⛔ 21 ⛔ 3.78% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userge/plugins/tools/manage.py load 70 ⛔ 453 ⛔ 20 ⛔ 5.89% ⛔ 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:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

sourcery-ai[bot] avatar Oct 23 '20 10:10 sourcery-ai[bot]

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.57 ⭐ 5.54 ⭐ -0.03 👍
Method Length 103.56 🙂 103.06 🙂 -0.50 👍
Working memory 11.34 😞 11.30 😞 -0.04 👍
Quality 67.57% 🙂 67.72% 🙂 0.15% 👍
Other metrics Before After Change
Lines 13177 15827 2650
Changed files Quality Before Quality After Quality Change
userge/plugins/init.py 83.37% ⭐ 83.37% ⭐ 0.00%
userge/plugins/help.py 60.33% 🙂 60.35% 🙂 0.02% 👍
userge/plugins/admin/gadmin.py 38.66% 😞 38.66% 😞 0.00%
userge/plugins/admin/gban.py 62.47% 🙂 62.47% 🙂 0.00%
userge/plugins/admin/gmute.py 51.47% 🙂 51.47% 🙂 0.00%
userge/plugins/admin/locks.py 45.41% 😞 45.41% 😞 0.00%
userge/plugins/admin/privacy.py 66.35% 🙂 66.35% 🙂 0.00%
userge/plugins/admin/purge.py 50.62% 🙂 50.62% 🙂 0.00%
userge/plugins/bot/alive.py 74.06% 🙂 79.12% ⭐ 5.06% 👍
userge/plugins/bot/bot_forwards.py 68.81% 🙂 68.84% 🙂 0.03% 👍
userge/plugins/bot/bot_pm.py 65.63% 🙂 66.32% 🙂 0.69% 👍
userge/plugins/bot/buttons.py 62.92% 🙂 62.96% 🙂 0.04% 👍
userge/plugins/bot/gapps.py 58.89% 🙂 58.89% 🙂 0.00%
userge/plugins/bot/inline_help.py 72.01% 🙂 72.01% 🙂 0.00%
userge/plugins/bot/ofox.py 50.81% 🙂 50.81% 🙂 0.00%
userge/plugins/bot/opinion.py 64.32% 🙂 64.32% 🙂 0.00%
userge/plugins/bot/secret.py 78.42% ⭐ 78.50% ⭐ 0.08% 👍
userge/plugins/bot/utube_inline.py 69.03% 🙂 69.03% 🙂 0.00%
userge/plugins/fun/autopic.py 60.08% 🙂 60.08% 🙂 0.00%
userge/plugins/fun/carbon.py 2.74% ⛔ 2.74% ⛔ 0.00%
userge/plugins/fun/convert.py 79.13% ⭐ 79.13% ⭐ 0.00%
userge/plugins/fun/gen_memes.py 34.62% 😞 34.62% 😞 0.00%
userge/plugins/fun/gizoogle.py 77.41% ⭐ 77.41% ⭐ 0.00%
userge/plugins/fun/kang.py 52.91% 🙂 52.91% 🙂 0.00%
userge/plugins/fun/memes.py 72.72% 🙂 72.72% 🙂 0.00%
userge/plugins/fun/nekos.py 46.43% 😞 46.43% 😞 0.00%
userge/plugins/fun/nsfw.py 73.63% 🙂 73.63% 🙂 0.00%
userge/plugins/fun/plet.py 59.45% 🙂 59.45% 🙂 0.00%
userge/plugins/fun/quote.py 58.36% 🙂 58.36% 🙂 0.00%
userge/plugins/fun/spotify_autobio.py 62.58% 🙂 62.64% 🙂 0.06% 👍
userge/plugins/fun/stylish.py 58.82% 🙂 58.91% 🙂 0.09% 👍
userge/plugins/fun/type.py 64.35% 🙂 64.35% 🙂 0.00%
userge/plugins/fun/weebo.py 67.31% 🙂 66.98% 🙂 -0.33% 👎
userge/plugins/fun/whois.py 31.10% 😞 31.10% 😞 0.00%
userge/plugins/fun/word_counter.py 76.09% ⭐ 76.09% ⭐ 0.00%
userge/plugins/fun/x.py 65.50% 🙂 65.50% 🙂 0.00%
userge/plugins/fun/year_progress.py 76.90% ⭐ 76.90% ⭐ 0.00%
userge/plugins/misc/download.py 17.06% ⛔ 17.06% ⛔ 0.00%
userge/plugins/misc/gdrive.py 76.84% ⭐ 76.84% ⭐ 0.00%
userge/plugins/misc/instadl.py 70.07% 🙂 70.07% 🙂 0.00%
userge/plugins/misc/pathlib.py 77.31% ⭐ 77.31% ⭐ 0.00%
userge/plugins/misc/redditdl.py 60.69% 🙂 60.69% 🙂 0.00%
userge/plugins/misc/upload.py 53.78% 🙂 53.78% 🙂 0.00%
userge/plugins/misc/utube.py 57.65% 🙂 57.65% 🙂 0.00%
userge/plugins/tools/all.py 88.37% ⭐ 88.37% ⭐ 0.00%
userge/plugins/tools/cancel.py 92.68% ⭐ 92.68% ⭐ 0.00%
userge/plugins/tools/delete.py 93.26% ⭐ 93.26% ⭐ 0.00%
userge/plugins/tools/executor.py 80.49% ⭐ 80.49% ⭐ 0.00%
userge/plugins/tools/ids.py 42.22% 😞 42.22% 😞 0.00%
userge/plugins/tools/json.py 82.41% ⭐ 82.41% ⭐ 0.00%
userge/plugins/tools/logs.py 50.82% 🙂 50.82% 🙂 0.00%
userge/plugins/tools/manage.py 31.40% 😞 31.40% 😞 0.00%
userge/plugins/tools/ping.py 86.05% ⭐ 93.03% ⭐ 6.98% 👍
userge/plugins/tools/repo.py 94.58% ⭐ 94.58% ⭐ 0.00%
userge/plugins/tools/sd.py 79.76% ⭐ 79.76% ⭐ 0.00%
userge/plugins/tools/search.py 67.84% 🙂 67.84% 🙂 0.00%
userge/plugins/tools/sudo.py 67.16% 🙂 67.16% 🙂 0.00%
userge/plugins/tools/system.py 69.98% 🙂 69.98% 🙂 0.00%
userge/plugins/tools/timeout.py 79.74% ⭐ 79.74% ⭐ 0.00%
userge/plugins/tools/updater.py 61.55% 🙂 61.55% 🙂 0.00%
userge/plugins/utils/admins.py 27.71% 😞 27.71% 😞 0.00%
userge/plugins/utils/afk.py 56.70% 🙂 56.70% 🙂 0.00%
userge/plugins/utils/circle.py 26.23% 😞 26.23% 😞 0.00%
userge/plugins/utils/covid.py 45.37% 😞 45.37% 😞 0.00%
userge/plugins/utils/currency.py 49.93% 😞 49.93% 😞 0.00%
userge/plugins/utils/dic.py 44.10% 😞 44.10% 😞 0.00%
userge/plugins/utils/direct_links.py 60.89% 🙂 60.89% 🙂 0.00%
userge/plugins/utils/filters.py 65.48% 🙂 65.48% 🙂 0.00%
userge/plugins/utils/google.py 46.75% 😞 46.75% 😞 0.00%
userge/plugins/utils/hash.py 58.87% 🙂 58.87% 🙂 0.00%
userge/plugins/utils/header.py 51.60% 🙂 51.60% 🙂 0.00%
userge/plugins/utils/mediainfo.py 52.86% 🙂 67.58% 🙂 14.72% 👍
userge/plugins/utils/notes.py 66.49% 🙂 66.49% 🙂 0.00%
userge/plugins/utils/ocr.py 76.40% ⭐ 76.40% ⭐ 0.00%
userge/plugins/utils/paste.py 34.62% 😞 34.62% 😞 0.00%
userge/plugins/utils/pm_logger.py 71.17% 🙂 71.17% 🙂 0.00%
userge/plugins/utils/pmpermit.py 68.65% 🙂 68.65% 🙂 0.00%
userge/plugins/utils/removebg.py 45.56% 😞 45.56% 😞 0.00%
userge/plugins/utils/snips.py 65.91% 🙂 65.91% 🙂 0.00%
userge/plugins/utils/speedtest.py 67.89% 🙂 67.89% 🙂 0.00%
userge/plugins/utils/telegraph.py 40.93% 😞 40.93% 😞 0.00%
userge/plugins/utils/thumbnail.py 72.83% 🙂 72.83% 🙂 0.00%
userge/plugins/utils/translate.py 47.31% 😞 47.31% 😞 0.00%
userge/plugins/utils/ud.py 49.30% 😞 49.30% 😞 0.00%
userge/plugins/utils/weather.py 77.21% ⭐ 77.16% ⭐ -0.05% 👎
userge/plugins/utils/webss.py 74.23% 🙂 74.23% 🙂 0.00%
userge/plugins/utils/welcome.py 72.72% 🙂 72.72% 🙂 0.00%
userge/plugins/utils/wikipedia.py 52.54% 🙂 52.54% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
userge/plugins/help.py inline_answer 145 ⛔ 1469 ⛔ 42 ⛔ 0.14% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userge/plugins/fun/carbon.py carbon_ 53 ⛔ 730 ⛔ 52 ⛔ 2.74% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userge/plugins/fun/spotify_autobio.py spotify_biox 95 ⛔ 691 ⛔ 23 ⛔ 2.91% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userge/plugins/fun/kang.py kang_ 95 ⛔ 828 ⛔ 21 ⛔ 3.78% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userge/plugins/tools/manage.py load 70 ⛔ 453 ⛔ 20 ⛔ 5.89% ⛔ 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:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

sourcery-ai[bot] avatar Oct 23 '20 10:10 sourcery-ai[bot]