-
Notifications
You must be signed in to change notification settings - Fork 0
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
failing test (Sourcery refactored) #16
Conversation
8bc090d
to
bd03afb
Compare
bd03afb
to
853cec5
Compare
assert 1+1 == 2 | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function test_2
refactored with the following changes:
- Remove
assert True
statements (remove-assert-true
) - Simplify numeric comparison (
simplify-numeric-comparison
) - Simplify x == x -> True and x != x -> False (
equality-identity
)
assert (1 == 2) is False | ||
assert 1 != 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function test_3
refactored with the following changes:
- Simplify comparison to boolean (
simplify-boolean-comparison
)
assert len([]) == 0 | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function test_4
refactored with the following changes:
- Remove
assert True
statements (remove-assert-true
) - Simplify sequence length comparison (
simplify-len-comparison
) - Replace constant collection with boolean in boolean contexts (
collection-to-bool
) - Removes or propagates redundant boolean expressions (
remove-redundant-boolean
)
assert False is False | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function test_5
refactored with the following changes:
- Remove
assert True
statements (remove-assert-true
) - Simplify comparison to boolean (
simplify-boolean-comparison
) - Removes or propagates redundant boolean expressions (
remove-redundant-boolean
)
Pull Request #15 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
test
branch, then run:Help us improve this pull request!