Skip to content

Conversation

@sourcery-ai
Copy link

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

Pull Request #69 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

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:

Review changes via command line

To manually merge these changes, make sure you're on the app_store branch, then run:

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

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from Archmonger January 23, 2022 12:05
@sourcery-ai sourcery-ai bot force-pushed the sourcery/app_store branch 4 times, most recently from 1c65fac to 62871df Compare January 26, 2022 21:58
@sourcery-ai sourcery-ai bot force-pushed the sourcery/app_store branch from 62871df to e1bd515 Compare January 27, 2022 03:23
_DB_ENGINE = None
ENV_PREFIX = os.environ.get("CONREQ_ENV_PREFIX", "").rstrip("_").upper()
if ENV_PREFIX:
if ENV_PREFIX := os.environ.get("CONREQ_ENV_PREFIX", "").rstrip("_").upper():
Copy link
Author

Choose a reason for hiding this comment

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

Lines 14-15 refactored with the following changes:

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Jan 27, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 4.48 ⭐ 4.52 ⭐ 0.04 👎
Method Length 44.27 ⭐ 44.18 ⭐ -0.09 👍
Working memory 5.98 ⭐ 5.99 ⭐ 0.01 👎
Quality 80.88% 80.82% -0.06% 👎
Other metrics Before After Change
Lines 147 146 -1
Changed files Quality Before Quality After Quality Change
conreq/utils/environment.py 80.88% ⭐ 80.82% ⭐ -0.06% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
conreq/utils/environment.py set_env 5 ⭐ 66 🙂 10 😞 69.01% 🙂 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!

@sourcery-ai sourcery-ai bot closed this Jan 27, 2022
@sourcery-ai sourcery-ai bot deleted the sourcery/app_store branch January 27, 2022 18:34
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