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

Sourcery refactored master branch #1

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

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Jul 27, 2020

Branch master 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 master branch, then run:

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

Comment on lines -80 to +81
for e in exclude:
if exclude[e] is not None:
for e, value in exclude.items():
if value is not None:
Copy link
Author

Choose a reason for hiding this comment

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

Lines 80-81 refactored with the following changes:

  • Use items() to directly unpack dictionary values (use-dict-items)

score_fields_sum = sum([getattr(obj, f) for f in score_fields])
score_fields_sum = sum(getattr(obj, f) for f in score_fields)
Copy link
Author

Choose a reason for hiding this comment

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

Function order_by_score refactored with the following changes:

  • Replace unneeded comprehension with generator (comprehension-to-generator)

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Jul 27, 2020

Sourcery Code Quality Report (beta)

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 6.00 6.00 0.00
Method Length 96.83 97.08 0.25 🔴
Quality 7.44 7.44 0.00
Other metrics Before After Change
Lines 142 142 0
Changed files Quality Before Quality After Quality Change
setup.py 4.38 4.37 -0.01 🔴
drum/links/utils.py 8.46 8.46 0.00

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 via email or our Gitter!

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.

0 participants