-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
IgnoreResultAction.py: Fix line length violation bug #5208
base: master
Are you sure you want to change the base?
Conversation
Comment on e0a45c9. Shortlog of the HEAD commit contains 52 character(s). This is 2 character(s) longer than the limit (52 > 50). Origin: GitCommitBear, Section: |
e0a45c9
to
3a727dc
Compare
if not ignore_comment: | ||
return file_diff_dict | ||
|
||
a = '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' |
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.
E501 line too long (111 > 80 characters)
Origin: PycodestyleBear (E501), Section: autopep8
.
if not ignore_comment: | ||
return file_diff_dict | ||
|
||
a = '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' |
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 is longer than allowed. (111 > 80)
Origin: LineLengthBear, Section: linelength
.
0decf21
to
3ad2316
Compare
@@ -78,40 +79,95 @@ def apply(self, result, original_file_dict, file_diff_dict, language: str, | |||
|
|||
return file_diff_dict | |||
|
|||
def get_ignore_comment(self, origin, language): | |||
def get_ignore_comment(self, language, spaces: str=''): |
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.
please restore origin
. removing it is a breaking change.
Do not do that.
Add docstring params to state it is unused.
Also explain what spaces
should be in the docstring.
r""" | ||
Returns a string of Ignore Comment, depending on the language | ||
Returns a tuple consisting of a formattable string of Ignore |
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.
you can not change the return type of a function. That is a breaking change, as unpacking it will cause an exception.
Do not do that.
If necessary, create a new function which works differently, and try to patch the old function so it sort-of does the 'best' thing, or just remove the old function as that provides a clean breakage for people to investigate why a function disappeared.
3ad2316
to
cdbf141
Compare
cdbf141
to
e4469bb
Compare
@@ -36,6 +36,7 @@ def is_applicable(result: Result, | |||
|
|||
filenames = set(src.renamed_file(file_diff_dict) | |||
for src in result.affected_code) | |||
|
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.
unrelated change. drop it.
There are issues related to #5077 here. This one should be blocked until that is fixed. |
IgnoreResultAction violates line length restrictions. This commit fixes the bug by using block style comments. Fixes coala#4851
e4469bb
to
25899ec
Compare
IgnoreResultAction violates line length restrictions.
This commit fixes the bug by using block style comments.
Fixes #4851
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!