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
DocumentationComment.py: Add marker[1]==marker[2]
#4319
Conversation
(self.indent if lines[-1][-1] == '\n' else '') + | ||
self.marker[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.
E124 closing bracket does not match visual indentation'
PycodestyleBear (E124), severity NORMAL, section autopep8
.
@@ -221,6 +221,8 @@ def assemble(self): | |||
assembled += ''.join('\n' if line == '\n' and not self.marker[1] | |||
else self.indent + self.marker[1] + line | |||
for line in lines[1:]) | |||
return (assembled + | |||
return (assembled if self.marker[1] == self.marker[2] else | |||
(assembled + | |||
(self.indent if lines[-1][-1] == '\n' else '') + |
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.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/coalib/bearlib/languages/documentation/DocumentationComment.py
+++ b/coalib/bearlib/languages/documentation/DocumentationComment.py
@@ -223,6 +223,6 @@
for line in lines[1:])
return (assembled if self.marker[1] == self.marker[2] else
(assembled +
- (self.indent if lines[-1][-1] == '\n' else '') +
- self.marker[2])
- )
+ (self.indent if lines[-1][-1] == '\n' else '') +
+ self.marker[2])
+ )
Comment on 78ff3feef1d39f7c3f322ac427b3696ace9c3ab8. Shortlog of the HEAD commit contains 51 character(s). This is 1 character(s) longer than the limit (51 > 50). GitCommitBear, severity NORMAL, section |
@damngamerz Sorry about being a day late, but this change needs to happen at |
Ping on gitter if you need help. 😄 |
oops sorry about the confusion small style nitpick and needs rebase, then merge 😄 |
(assembled + | ||
(self.indent if lines[-1][-1] == '\n' else '') + | ||
self.marker[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.
can we make it like this?
return (assembled if self.marker[1] == self.marker[2] else
(assembled + (self.indent if lines[-1][-1] == '\n' else '') +
self.marker[2]))
the last bracket should be on the same line imo
oops sorry about the confusion small style nitpick and needs rebase, then merge 😄 |
oops didnt notice this, but we use |
assemble() accounts for `marker[1]==marker[2]` Fixes coala#2645
ack c79ec5a |
@rultor merge |
assemble() accounts for
marker[1]==marker[2]
Fixes #2645
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:
cobot 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!