Skip to content

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Dec 11, 2021

Branch main 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 main branch, then run:

git fetch origin sourcery/main
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from PR0FESS0R-99 December 11, 2021 04:42
Comment on lines -44 to +47
# Heroku Support
user = "👋Hey {}, \n You are not the deploy of this bot"
run = "WxJ3G7NBb4c" # https://github.com/PR0FESS0R-99/Auto-Welcome-Bot
api_key = os.environ.get("APP_NAME", "AutoWelcomeBot")
DEPLOY = bool(os.environ.get("HOSTED"))
OWNER_ID = set(int(x) for x in os.environ.get("OWNER_ID", "").split())
OWNER_ID = {int(x) for x in os.environ.get("OWNER_ID", "").split()}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function admin refactored with the following changes:

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Dec 11, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 6.11 ⭐ 6.11 ⭐ 0.00
Method Length 92.60 🙂 92.20 🙂 -0.40 👍
Working memory 12.64 😞 12.27 😞 -0.37 👍
Quality 54.26% 🙂 55.06% 🙂 0.80% 👍
Other metrics Before After Change
Lines 140 140 0
Changed files Quality Before Quality After Quality Change
main.py 54.26% 🙂 55.06% 🙂 0.80% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
main.py auto_welcome 10 🙂 217 ⛔ 17 ⛔ 37.51% 😞 Try splitting into smaller methods. Extract out complex expressions
main.py admin 5 ⭐ 137 😞 10 😞 59.39% 🙂 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.

1 participant