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 Suggested Refactorings #1

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

Conversation

SourceryAI
Copy link

@SourceryAI SourceryAI commented Feb 24, 2021

Hi there!

Here are 2 refactorings we found that can help improve the readability/quality of your code.

We found another 17 refactorings in your repo as well but didn't want to open too big of a PR. Add Sourcery to your repo to see the rest of them and to get these types of refactorings on every pull request.

You can also get these types of suggestions while you work in VS Code or PyCharm.

One last thing. We're sending out this PR because we think it's helpful. If it isn't please let us know! Or ignore the PR and we won't bother you again 🙂

@SourceryAI SourceryAI closed this Feb 24, 2021
@SourceryAI SourceryAI reopened this Feb 24, 2021
if None in t:
p = t[None]
for j in range(len(p)):
points[i+j] = max(points[i+j], p[j])
Copy link
Author

Choose a reason for hiding this comment

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

Function Hyphenator.hyphenate_word refactored with the following changes:

  • Swap if/else branches (swap-if-else-branches)
  • Remove unnecessary else after guard condition (remove-unnecessary-else)

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