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
LineContinuationBear: Add ignore_with
option
#2844
base: master
Are you sure you want to change the base?
Conversation
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.
LGTM 👍
But check why AppVeyor build is failing |
It was because there wasn't 100% test coverage. Now I have added the necessary tests. |
Now it appears good, @li-boxuan please review this. |
@gitmate-bot rebase |
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently |
Add `ignore_with` option in LineContinuationBear to ignore backslashes used in `with` statements. Closes coala#2807
Automated rebase with GitMate.io was successful! 🎉 |
file='default')], | ||
filename='default') | ||
self.check_validity( | ||
self.uut, ["with open('hey.txt') as \\", |
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.
this is invalid syntax. Please use valid syntax in the python you use for your test cases
) | ||
) | ||
elif len(line) > 1 and ignore_with: | ||
if line[-2] in line_continuation and line[:5] != 'with ': |
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.
line[:5]
assumes the position of with
in the source line, which is not acceptable as with can appear at any indentation.
Add
ignore_with
option in LineContinuationBear to ignorebackslashes used in
with
statements.Closes #2807
For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!
Checklist
them.
individually. It is not sufficient to have "fixup commits" on your PR,
our bot will still report the issues for the previous commit.) You will
likely receive a lot of bot comments and build failures if coala does not
pass on every single commit!
After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.
Please consider helping us by reviewing other peoples pull requests as well:
corobo mark wip <URL>
to get it outof the review queue.
The more you review, the more your score will grow at coala.io and we will
review your PRs faster!