-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Make sure to split non-separated csv OuputLine's
#5665
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
Pull Request Test Coverage Report for Build 1683437463
π - Coveralls |
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.
π
Maybe we could remove the error handling ? There's no index error anymore. It could still happen with malformed output file. |
I think the |
Let's keep that un mind for 3.0, it's a breaking change for plugin development after all. Would you mind adding a todo comment close to the deprecation warnings ? |
Really? The
I did a quick search for |
No I meant a todo to remove this particular index error handling. Or do you think it's obvious ? The coverage decreased right now si it's easy to see the code became unused but we might not realize it later. I don't think we should add Todos for all deprecation warning. Sorry I'm on mobile so I can't be very detailled. I think the index error can happen on plugin code using our functional tests without enough elements in the output. |
Oh wait, there is another Looking into it I don't think the test is testing what it used to test. We raising a |
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 have added a test to make sure the IndexError is covered again. Basically we allow any OutputLine that is too long there so that we can still generate the nice error message even if it is too long.
I remember know. I wrote that code, I'm the one responsible for the lack of tests.. π
Thanks for covering that !
Type of Changes
Description
https://github.com/PyCQA/pylint/blob/2631583577a3b2228af66214a364e4e284ba55dd/tests/testutils/test_output_line.py#L126-L130
This example was not actually handled correctly. For some reason
issubclass(str, Sequence)
equalsTrue
, so theisinstance
check didn't make any sense. This meant that the above line had alen
of51
. This changes it so that a string will first be separated on the comma's and then parsed.The diff is quite large as the indentation could then be removed.
I also hope this removes some
DeprecationWarnings
that were showing up in the test suite on3.7
and3.8
.