Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Sourcery refactored main branch #388

Merged
merged 1 commit into from
Jan 16, 2022
Merged

Sourcery refactored main branch #388

merged 1 commit into from
Jan 16, 2022

Conversation

sourcery-ai[bot]
Copy link
Contributor

@sourcery-ai sourcery-ai bot commented Jan 14, 2022

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!

examples/tweet_generator/tweet_generator.py Show resolved Hide resolved
pincer/commands/commands.py Outdated Show resolved Hide resolved
pincer/commands/commands.py Show resolved Hide resolved
pincer/commands/components/decorators.py Show resolved Hide resolved
pincer/objects/app/interactions.py Show resolved Hide resolved
pincer/utils/event_mgr.py Outdated Show resolved Hide resolved
@sourcery-ai
Copy link
Contributor Author

sourcery-ai bot commented Jan 14, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 11.45 🙂 11.54 🙂 0.09 👎
Method Length 53.67 ⭐ 53.51 ⭐ -0.16 👍
Working memory 9.95 😞 10.12 😞 0.17 👎
Quality 65.54% 🙂 65.01% 🙂 -0.53% 👎
Other metrics Before After Change
Lines 2144 2111 -33
Changed files Quality Before Quality After Quality Change
examples/tweet_generator/tweet_generator.py 67.18% 🙂 67.19% 🙂 0.01% 👍
pincer/commands/commands.py 47.71% 😞 45.77% 😞 -1.94% 👎
pincer/commands/components/decorators.py 79.01% ⭐ 79.30% ⭐ 0.29% 👍
pincer/objects/app/interactions.py 74.71% 🙂 74.26% 🙂 -0.45% 👎
pincer/utils/event_mgr.py 86.73% ⭐ 86.84% ⭐ 0.11% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
pincer/commands/commands.py command 61 ⛔ 417 ⛔ 26 ⛔ 4.43% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
pincer/commands/commands.py register_command 12 🙂 247 ⛔ 21 ⛔ 31.07% 😞 Try splitting into smaller methods. Extract out complex expressions
pincer/commands/commands.py ChatCommandHandler.__build_local_commands 20 😞 220 ⛔ 12 😞 35.47% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
pincer/objects/app/interactions.py Interaction.__post_init__ 14 🙂 182 😞 15 😞 38.75% 😞 Try splitting into smaller methods. Extract out complex expressions
examples/tweet_generator/tweet_generator.py Bot.twitter 2 ⭐ 219 ⛔ 9 🙂 57.13% 🙂 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!

@Lunarmagpie
Copy link
Member

Why are all of these things I did 💀

@codecov
Copy link

codecov bot commented Jan 16, 2022

Codecov Report

Merging #388 (9dda9d1) into main (53a0452) will increase coverage by 0.63%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #388      +/-   ##
==========================================
+ Coverage   90.54%   91.17%   +0.63%     
==========================================
  Files           8        9       +1     
  Lines          74      102      +28     
==========================================
+ Hits           67       93      +26     
- Misses          7        9       +2     
Impacted Files Coverage Δ
tests/objects/guild/test_permission.py 92.85% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53a0452...9dda9d1. Read the comment docs.

@Sigmanificient Sigmanificient merged commit e5e788b into main Jan 16, 2022
@Sigmanificient Sigmanificient deleted the sourcery/main branch January 16, 2022 17:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants