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

Srcy suggestion1 (Sourcery refactored) #3

Closed
wants to merge 1 commit into from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Sep 7, 2020

Pull Request #2 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 srcy-suggestion1 branch, then run:

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

for ch in text:
yield ch
yield from text
Copy link
Author

Choose a reason for hiding this comment

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

Function Canvas.__str__.wider refactored with the following changes:

  • Replace yield inside for loop with yield from (yield-from)

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Sep 7, 2020

Sourcery Code Quality Report (beta)

✅  Merging this PR will increase code quality in the affected files by 0.02 out of 10.

Quality metrics Before After Change
Complexity 2.55 2.41 -0.14 🔵
Method Length 45.72 45.45 -0.27 🔵
Quality 8.69 8.71 0.02 🔵
Other metrics Before After Change
Lines 185 183 -2
Changed files Quality Before Quality After Quality Change
problem/pixel/line_draw.py 8.69 8.71 0.02 🔵

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

File Function Complexity Length Overall Recommendation
problem/pixel/line_draw.py CanvasTest.test_canvas 1 176.58 6.36 Split out functionality

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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@sourcery-ai sourcery-ai bot closed this Sep 8, 2020
@sourcery-ai sourcery-ai bot deleted the sourcery/srcy-suggestion1 branch September 8, 2020 17:29
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.

None yet

0 participants