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
[pylint] Fixes all use-maxplit-args
, consider-using-enumerate
, implicit-str-concat
#12172
base: main
Are you sure you want to change the base?
[pylint] Fixes all use-maxplit-args
, consider-using-enumerate
, implicit-str-concat
#12172
Conversation
46b7775
to
bb4bd7e
Compare
Converting to draft as I need to add tests for the missing coverage |
testing/_py/test_local.py
Outdated
@@ -207,7 +207,7 @@ def test_visit_norecurse(self, path1): | |||
|
|||
@pytest.mark.parametrize( | |||
"fil", | |||
["*dir", "*dir", pytest.mark.skip("sys.version_info <" " (3,6)")(b"*dir")], | |||
["*dir", "*dir", pytest.mark.skip("sys.version_info < (3,6)")(b"*dir")], |
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.
We can remove this:
["*dir", "*dir", pytest.mark.skip("sys.version_info < (3,6)")(b"*dir")], | |
["*dir", "*dir", b"*dir"], |
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.
Right ! Removed the reminder for the whole codebase in 7ded8d8
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.
yikes, we had skip instead of skipif and the tests where broken
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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.
Thank you for looking into it, I was stuck. I'm not sure I understand though, should I replace ["*dir", "*dir", b"*dir"],
back to ["*dir", "*dir", pytest.mark.skipif("sys.version_info < (3,6)")(b"*dir")],
and then fix the tests ? Maybe in another merge request at this point ?
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.
in the Visitor class of the local path clone, there is a condition we need to replace
https://github.com/pytest-dev/pytest/blob/main/src/_pytest/_py/path.py#L140 - it should also check for bytes
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.
when asottile took out a lot of cruft a basestring usage was misinterpreted and replaced with just str
unfortunately the skips where wrong and thus the error was never noted as the tests skipped instead of passing
9699b3d
to
7ded8d8
Compare
…ng the first element
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
7ded8d8
to
5f1012c
Compare
for more information, see https://pre-commit.ci
Using
maxsplit=1
fromuse-maxplit-args
will make splits slightly faster and is the important one that will improve performances.The other fix are about readability / style.