Skip to content

Samantha_robot (Sourcery refactored)#13

Open
sourcery-ai[bot] wants to merge 10 commits intomainfrom
sourcery/pull-12
Open

Samantha_robot (Sourcery refactored)#13
sourcery-ai[bot] wants to merge 10 commits intomainfrom
sourcery/pull-12

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Jul 6, 2022

Pull Request #12 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/MRK-YT/Rose-Bot pull/12/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!

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Jul 6, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 10.46 🙂 9.67 🙂 -0.79 👍
Method Length 114.33 🙂 113.87 🙂 -0.46 👍
Working memory 11.49 😞 11.97 😞 0.48 👎
Quality 52.40% 🙂 52.73% 🙂 0.33% 👍
Other metrics Before After Change
Lines 457 537 80
Changed files Quality Before Quality After Quality Change
tg_bot/main.py 52.40% 🙂 52.73% 🙂 0.33% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
tg_bot/main.py start 16 🙂 198 😞 15 😞 35.81% 😞 Try splitting into smaller methods. Extract out complex expressions
tg_bot/main.py settings_button 7 ⭐ 280 ⛔ 18 ⛔ 36.18% 😞 Try splitting into smaller methods. Extract out complex expressions
tg_bot/main.py help_button 7 ⭐ 197 😞 13 😞 46.54% 😞 Try splitting into smaller methods. Extract out complex expressions
tg_bot/main.py get_help 4 ⭐ 113 🙂 16 ⛔ 54.30% 🙂 Extract out complex expressions
tg_bot/main.py main 5 ⭐ 162 😞 9 🙂 58.79% 🙂 Try splitting into smaller methods

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!

@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-12 branch from bb67fb5 to 0f279e0 Compare July 6, 2022 07:30
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-12 branch from 0f279e0 to 7142db5 Compare July 6, 2022 07:34
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-12 branch from 7142db5 to eb0014c Compare July 6, 2022 07:38
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-12 branch from eb0014c to 7db6428 Compare July 6, 2022 07:39
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.

1 participant