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) #25

Closed
wants to merge 71 commits into from
Closed

Hmmm (Sourcery refactored) #25

wants to merge 71 commits into from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Jul 13, 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:

@pep8speaks
Copy link

pep8speaks commented Jul 13, 2020

Hello @sourcery-ai[bot]! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 30:80: E501 line too long (125 > 79 characters)
Line 62:80: E501 line too long (89 > 79 characters)
Line 101:80: E501 line too long (86 > 79 characters)

Line 9:1: E303 too many blank lines (4)
Line 97:80: E501 line too long (81 > 79 characters)

Line 83:9: E301 expected 1 blank line, found 0

Line 121:27: W291 trailing whitespace
Line 130:80: E501 line too long (86 > 79 characters)
Line 141:1: E302 expected 2 blank lines, found 0

Line 2:80: E501 line too long (85 > 79 characters)
Line 14:1: E302 expected 2 blank lines, found 1
Line 15:80: E501 line too long (90 > 79 characters)
Line 36:80: E501 line too long (88 > 79 characters)
Line 83:80: E501 line too long (93 > 79 characters)

Line 22:1: W391 blank line at end of file

Line 5:80: E501 line too long (80 > 79 characters)
Line 40:1: E302 expected 2 blank lines, found 1
Line 40:56: W605 invalid escape sequence '_'
Line 40:65: W605 invalid escape sequence '_'
Line 40:74: W605 invalid escape sequence '_'
Line 40:80: E501 line too long (82 > 79 characters)
Line 46:1: W293 blank line contains whitespace
Line 50:80: E501 line too long (81 > 79 characters)
Line 51:80: E501 line too long (100 > 79 characters)
Line 57:1: W293 blank line contains whitespace
Line 68:80: E501 line too long (80 > 79 characters)

Line 50:59: E251 unexpected spaces around keyword / parameter equals
Line 50:61: E251 unexpected spaces around keyword / parameter equals
Line 77:80: E501 line too long (94 > 79 characters)

Line 17:1: W293 blank line contains whitespace
Line 162:5: E125 continuation line with same indent as next logical line

Line 88:80: E501 line too long (87 > 79 characters)
Line 298:80: E501 line too long (98 > 79 characters)
Line 325:80: E501 line too long (87 > 79 characters)
Line 343:80: E501 line too long (94 > 79 characters)
Line 374:80: E501 line too long (81 > 79 characters)
Line 382:80: E501 line too long (85 > 79 characters)

Line 178:80: E501 line too long (80 > 79 characters)
Line 261:80: E501 line too long (111 > 79 characters)
Line 273:80: E501 line too long (82 > 79 characters)
Line 323:1: W391 blank line at end of file

Line 140:80: E501 line too long (87 > 79 characters)
Line 162:80: E501 line too long (89 > 79 characters)
Line 163:80: E501 line too long (93 > 79 characters)

Line 210:80: E501 line too long (85 > 79 characters)
Line 226:80: E501 line too long (81 > 79 characters)
Line 237:80: E501 line too long (90 > 79 characters)

Line 78:5: E722 do not use bare 'except'

Line 63:80: E501 line too long (96 > 79 characters)

Line 28:5: E125 continuation line with same indent as next logical line

Line 150:80: E501 line too long (94 > 79 characters)

Comment last updated at 2020-09-20 16:08:55 UTC

@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-24 branch from ae5c9b6 to c532dd3 Compare July 14, 2020 07:39
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-24 branch from 237ae5f to 239c5e8 Compare August 20, 2020 16:31
ERROR: invalid argument "UniBorg" for "-t, --tag" flag: invalid reference format: repository name must be lowercase
See 'docker build --help'.
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-24 branch from 239c5e8 to 75a7cfa Compare August 21, 2020 04:59
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-24 branch from 75a7cfa to 91aa8db Compare August 30, 2020 06:55
@sourcery-ai
Copy link
Author

sourcery-ai bot commented Sep 20, 2020

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 4.71 ⭐ 5.52 ⭐ 0.81 👎
Method Length 91.75 🙂 102.24 🙂 10.49 👎
Working memory 8.10 🙂 8.24 🙂 0.14 👎
Quality 73.88% 🙂 72.29% 🙂 -1.59% 👎
Other metrics Before After Change
Lines 2047 2308 261
Changed files Quality Before Quality After Quality Change
sample_config.py 51.44% 🙂 51.26% 🙂 -0.18% 👎
stdborg.py 46.98% 😞 86.90% ⭐ 39.92% 👍
dbplugins/warns.py 75.69% ⭐ 75.61% ⭐ -0.08% 👎
stdplugins/_help.py 83.69% ⭐ 84.28% ⭐ 0.59% 👍
stdplugins/count.py 75.32% ⭐ 80.00% ⭐ 4.68% 👍
stdplugins/dart_n_dice.py 81.60% ⭐ 81.66% ⭐ 0.06% 👍
stdplugins/decide.py 91.07% ⭐ 91.07% ⭐ 0.00%
stdplugins/deezload.py % 66.00% 🙂 %
stdplugins/download.py 55.96% 🙂 55.98% 🙂 0.02% 👍
stdplugins/eval.py 75.22% ⭐ 74.15% 🙂 -1.07% 👎
stdplugins/fwd.py 89.61% ⭐ 89.98% ⭐ 0.37% 👍
stdplugins/google.py 70.91% 🙂 64.17% 🙂 -6.74% 👎
stdplugins/ping.py 92.77% ⭐ 92.93% ⭐ 0.16% 👍
stdplugins/rename.py 42.31% 😞 41.39% 😞 -0.92% 👎
stdplugins/telegraph.py 71.86% 🙂 71.86% 🙂 0.00%
stdplugins/thumbnail.py 74.71% 🙂 76.98% ⭐ 2.27% 👍
stdplugins/transfer_channel.py 87.96% ⭐ 87.81% ⭐ -0.15% 👎
stdplugins/upload.py 53.77% 🙂 53.17% 🙂 -0.60% 👎
stdplugins/xkcd.py 72.47% 🙂 61.60% 🙂 -10.87% 👎
uniborg/_inline_bot.py 67.59% 🙂 67.30% 🙂 -0.29% 👎
uniborg/uniborg.py 80.22% ⭐ 79.22% ⭐ -1.00% 👎
uniborg/util.py 71.26% 🙂 70.68% 🙂 -0.58% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
stdplugins/upload.py _ 56 ⛔ 361 ⛔ 20 ⛔ 8.29% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
stdplugins/download.py _ 25 😞 393 ⛔ 30 ⛔ 14.45% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
stdplugins/count.py stats 37 ⛔ 300 ⛔ 19 ⛔ 14.79% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
stdplugins/rename.py _ 28 😞 308 ⛔ 26 ⛔ 15.34% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
stdplugins/rename.py _ 17 🙂 407 ⛔ 28 ⛔ 20.10% ⛔ 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 sourcery-ai bot closed this Sep 21, 2020
@sourcery-ai sourcery-ai bot deleted the sourcery/pull-24 branch September 21, 2020 15:45
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.

None yet

7 participants