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

Argparser to Click switch (Sourcery refactored) #220

Merged
merged 1 commit into from
Oct 14, 2021

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Oct 14, 2021

Pull Request #204 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 from-argparse-to-click branch, then run:

git fetch origin sourcery/from-argparse-to-click
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from ggirelli October 14, 2021 14:42
if self.loaded:
s += " [loaded]"
else:
s += " [unloaded]"
s += " [loaded]" if self.loaded else " [unloaded]"
Copy link
Author

Choose a reason for hiding this comment

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

Function Image.__repr__ refactored with the following changes:

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Oct 14, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.72 ⭐ 2.71 ⭐ -0.01 👍
Method Length 39.88 ⭐ 39.86 ⭐ -0.02 👍
Working memory 6.89 🙂 6.89 🙂 0.00
Quality 79.13% 79.17% 0.04% 👍
Other metrics Before After Change
Lines 891 888 -3
Changed files Quality Before Quality After Quality Change
radiantkit/image.py 79.13% ⭐ 79.17% ⭐ 0.04% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
radiantkit/image.py threshold_adaptive 5 ⭐ 133 😞 13 😞 54.65% 🙂 Try splitting into smaller methods. Extract out complex expressions
radiantkit/image.py save_tiff 4 ⭐ 110 🙂 14 😞 57.07% 🙂 Extract out complex expressions
radiantkit/image.py remove_unexpected_axes 7 ⭐ 129 😞 9 🙂 60.44% 🙂 Try splitting into smaller methods
radiantkit/image.py inherit_labels 5 ⭐ 121 😞 10 😞 61.30% 🙂 Try splitting into smaller methods. Extract out complex expressions
radiantkit/image.py Image.__init__ 4 ⭐ 145 😞 9 🙂 61.54% 🙂 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!

@ggirelli ggirelli merged commit 90aeed4 into from-argparse-to-click Oct 14, 2021
@ggirelli ggirelli deleted the sourcery/from-argparse-to-click branch October 14, 2021 14:57
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.

1 participant