Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hmmm (Sourcery refactored) #30

Open
wants to merge 183 commits into
base: patch-4
Choose a base branch
from
Open

Hmmm (Sourcery refactored) #30

wants to merge 183 commits into from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Sep 28, 2020

Pull Request #24 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to
    the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/prono69/PepeBot pull/24/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

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

Help us improve this pull request!

Ability to exporting webpages to telegraph archive.
@sourcery-ai
Copy link
Author

sourcery-ai bot commented Jan 23, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 15.43 🙂 17.45 🙂 2.02 👎
Method Length 74.55 🙂 79.14 🙂 4.59 👎
Working memory 11.37 😞 12.11 😞 0.74 👎
Quality 53.73% 🙂 50.91% 🙂 -2.82% 👎
Other metrics Before After Change
Lines 5095 4597 -498
Changed files Quality Before Quality After Quality Change
dbplugins/antiflood.py 72.73% 🙂 72.64% 🙂 -0.09% 👎
dbplugins/blacklist.py 70.34% 🙂 70.11% 🙂 -0.23% 👎
dbplugins/filters.py 63.58% 🙂 65.71% 🙂 2.13% 👍
dbplugins/locks.py 35.81% 😞 35.58% 😞 -0.23% 👎
dbplugins/snip.py 72.17% 🙂 71.68% 🙂 -0.49% 👎
dbplugins/warns.py 65.67% 🙂 65.38% 🙂 -0.29% 👎
dbplugins/welcome.py 68.29% 🙂 67.61% 🙂 -0.68% 👎
sql_helpers/init.py 95.19% ⭐ 97.01% ⭐ 1.82% 👍
sql_helpers/antiflood_sql.py 82.65% ⭐ 82.10% ⭐ -0.55% 👎
stdplugins/_help.py 73.41% 🙂 68.12% 🙂 -5.29% 👎
stdplugins/account_profile.py 74.35% 🙂 74.21% 🙂 -0.14% 👎
stdplugins/calendar.py 54.78% 🙂 54.67% 🙂 -0.11% 👎
stdplugins/call_admin.py 75.99% ⭐ 73.13% 🙂 -2.86% 👎
stdplugins/coinflip.py 57.74% 🙂 57.61% 🙂 -0.13% 👎
stdplugins/colors.py 59.99% 🙂 60.37% 🙂 0.38% 👍
stdplugins/count.py 48.01% 😞 30.76% 😞 -17.25% 👎
stdplugins/currency.py 52.09% 🙂 51.98% 🙂 -0.11% 👎
stdplugins/dagd.py 77.86% ⭐ 77.70% ⭐ -0.16% 👎
stdplugins/decide.py 82.46% ⭐ 82.94% ⭐ 0.48% 👍
stdplugins/download.py 15.63% ⛔ 15.80% ⛔ 0.17% 👍
stdplugins/emojis.py 55.70% 🙂 52.36% 🙂 -3.34% 👎
stdplugins/eval.py 45.72% 😞 45.96% 😞 0.24% 👍
stdplugins/file_converter.py 31.20% 😞 25.26% 😞 -5.94% 👎
stdplugins/fileext.py 69.04% 🙂 68.90% 🙂 -0.14% 👎
stdplugins/fwd.py 74.20% 🙂 76.81% ⭐ 2.61% 👍
stdplugins/get_admin.py 33.60% 😞 36.58% 😞 2.98% 👍
stdplugins/github.py 50.20% 🙂 50.09% 🙂 -0.11% 👎
stdplugins/google.py 55.69% 🙂 47.02% 😞 -8.67% 👎
stdplugins/ifsc.py 67.86% 🙂 67.71% 🙂 -0.15% 👎
stdplugins/imdb.py 51.50% 🙂
stdplugins/invite.py 47.66% 😞 49.98% 😞 2.32% 👍
stdplugins/markdown.py 68.44% 🙂 68.84% 🙂 0.40% 👍
stdplugins/meaning.py 58.61% 🙂 58.72% 🙂 0.11% 👍
stdplugins/ninja.py 77.38% ⭐ 77.38% ⭐ 0.00%
stdplugins/ocr.py 70.54% 🙂 73.25% 🙂 2.71% 👍
stdplugins/ping.py 82.99% ⭐ 82.99% ⭐ 0.00%
stdplugins/polls.py 51.00% 🙂 50.63% 🙂 -0.37% 👎
stdplugins/power_tools.py 94.83% ⭐ 91.84% ⭐ -2.99% 👎
stdplugins/promote.py 71.36% 🙂 68.88% 🙂 -2.48% 👎
stdplugins/purge.py 59.14% 🙂 57.19% 🙂 -1.95% 👎
stdplugins/remove.bg.py 56.34% 🙂 55.34% 🙂 -1.00% 👎
stdplugins/sca.py 88.76% ⭐ 86.30% ⭐ -2.46% 👎
stdplugins/screencapture.py 55.02% 🙂 55.21% 🙂 0.19% 👍
stdplugins/speedtest.py 50.22% 🙂 42.41% 😞 -7.81% 👎
stdplugins/tagall.py 83.41% ⭐ 83.09% ⭐ -0.32% 👎
stdplugins/telegraph.py 28.30% 😞 24.49% ⛔ -3.81% 👎
stdplugins/thumbnail.py 65.98% 🙂 63.57% 🙂 -2.41% 👎
stdplugins/time.py 61.95% 🙂 61.45% 🙂 -0.50% 👎
stdplugins/transfer_channel.py 75.92% ⭐ 75.63% ⭐ -0.29% 👎
stdplugins/translate.py 65.85% 🙂 66.10% 🙂 0.25% 👍
stdplugins/tts.py 48.72% 😞 48.90% 😞 0.18% 👍
stdplugins/typewriter.py 60.77% 🙂 60.88% 🙂 0.11% 👍
stdplugins/ukinti.py 14.53% ⛔ 14.04% ⛔ -0.49% 👎
stdplugins/upload.py 25.68% 😞 22.22% ⛔ -3.46% 👎
stdplugins/urbandictionary.py 64.38% 🙂 64.24% 🙂 -0.14% 👎
stdplugins/watch.py 59.40% 🙂 60.11% 🙂 0.71% 👍
stdplugins/weather.py 67.65% 🙂 67.52% 🙂 -0.13% 👎
stdplugins/whois.py 40.24% 😞 32.49% 😞 -7.75% 👎
stdplugins/xkcd.py 43.19% 😞 23.02% ⛔ -20.17% 👎
uniborg/_core.py 75.06% ⭐ 75.07% ⭐ 0.01% 👍
uniborg/_inline_bot.py 66.34% 🙂 65.06% 🙂 -1.28% 👎
uniborg/uniborg.py 60.02% 🙂 54.12% 🙂 -5.90% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
stdplugins/ukinti.py _ 128 ⛔ 520 ⛔ 21 ⛔ 3.98% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
stdplugins/upload.py _ 73 ⛔ 401 ⛔ 22 ⛔ 5.18% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
stdplugins/download.py _ 23 😞 396 ⛔ 29 ⛔ 15.80% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
dbplugins/locks.py _ 40 ⛔ 233 ⛔ 19 ⛔ 16.80% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
stdplugins/telegraph.py _ 33 ⛔ 360 ⛔ 16 ⛔ 17.45% ⛔ 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!

Help us improve this quality report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants