-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix column index of FIXME warnings #4246
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
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.
Great first change, the code is now correct and simpler ! I see there is another functional test to update (you can launch all tests locally with python3 -m pytest
), and I made a minor comment, but this is going to be in 2.7.3 :) Now that I think of it you can also add your change in the changelog if you want.
Thank you for the feedback! I added those changes, please let me know what you think. |
self.add_message( | ||
"fixme", | ||
col_offset=comment.string.lower().index(note.lower()), | ||
col_offset=comment.start[1] + 1, |
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.
If you notice here, comment.start[1] + 1
is the starting column of the user's comment. I think tabulation's spaces have been automatically counted during tokenization, so number of spaces won't always be a fixed number.
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 tests are passing now, I think this is great and we can merge 😄 . Is there something you want to change @ksaketou ?
Great! I don't have any more changes, I think the column will be fixed now :) |
Thank you for the merge request and congratulation on becoming a pylint contributor ! 🎉 |
Co-authored-by: Pierre Sassoulas <[email protected]>
Steps
doc/whatsnew/<current release.rst>
.Description
The column index value at the miscellaneous checker was changed. The grouping of the
match
variable was affecting the column index used each time (variablenote
), so thenote
variable was removed to fix that. Also, the expected column indexes of the functional test of FIXME warnings were changed.Type of Changes
Related Issue
Closes #4218