Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix disabling of
fixme
#7144Fix disabling of
fixme
#7144Changes from 2 commits
b93bffe
9998154
0f68480
813f5ca
714c4c4
31bcdd6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
I don't understand what this code is doing well. We were ignoring fixme if there was something looking like a pylint disable comment ? 😕
i.e.
pylint: disable=fixme TODO
orpylint: disable=no-member TODO
should not raise ?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.
Yeah, we were seeing if there is a
# pylint: disable=fixme
on the same line as thefixme
comment. However, we have other code that does this for us and it doesn't allow usingdisable-next
.Just removing is fine.
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.
I don't see the part where it's specific to "fixme" though, wasn't it a special case where you could add TODO in pylint disable ? (Someone too lazy to do a grep for "pylint: disable" at some point, but not lazy enough to not add TODO everywhere ?)
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.
I don't think it actually does anything other than disallow
disable
.PragmaParserError
probably catches all other issues.The fact that all of our
enable
tests work without this shows that it is completely unnecessary 😄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.
Sorry for asking but this cleanup looked too good to be true 😄 I'm just amazed at the number of time we just remove a bunch of code to fix a bug. It's been happening over and over.
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.
😄
I also was quite surprised when I found this code. At first I though for some reason the
fixme
checker was responsible for parsing allpragma's
but then I remembered that I actually refactored that code myself and made sure that it will always bePyLinter
... 😅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.
Having refactored half the codebase has its perks 😄