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

Refactor else / elif when if block has a raise statement #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karansthr
Copy link

Refactor else / elif when if block has a raise statement (#1)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

…atement (#1)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 5, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 11.14 🙂 11.64 🙂 0.50 👎
Method Length 51.62 ⭐ 51.62 ⭐ 0.00
Working memory 8.18 🙂 8.22 🙂 0.04 👎
Quality 63.06% 🙂 62.40% 🙂 -0.66% 👎
Other metrics Before After Change
Lines 399 399 0
Changed files Quality Before Quality After Quality Change
drfaddons/auth.py 70.96% 🙂 70.66% 🙂 -0.30% 👎
drfaddons/utils.py 61.13% 🙂 60.34% 🙂 -0.79% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
drfaddons/utils.py send_message 25 😞 257 ⛔ 11 😞 31.86% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
drfaddons/utils.py paginate_data 10 🙂 115 🙂 12 😞 53.67% 🙂 Extract out complex expressions
drfaddons/utils.py groupby_queryset_with_fields 10 🙂 79 🙂 10 😞 62.29% 🙂 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