pylint-dev / pylint-pytest

A Pylint plugin to suppress pytest-related false positives.
https://pypi.org/project/pylint-pytest/
MIT License
14 stars 3 forks source link

Support pylint v3 and drop v1 #27

Closed anis-campos closed 7 months ago

anis-campos commented 7 months ago

in pylint v3.0.0, there is https://github.com/pylint-dev/pylint/pull/8404, that breaks the current implementation of:

This fix is an attempt of supporting both pylint v2 and v3.

Other chances:

Fixes #12

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (fc8fa90) 92.50% compared to head (1195f5c) 94.16%.

:exclamation: Current head 1195f5c differs from pull request most recent head a9a022f. Consider uploading reports for the commit a9a022f to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #27 +/- ## ========================================== + Coverage 92.50% 94.16% +1.66% ========================================== Files 18 18 Lines 560 548 -12 Branches 109 106 -3 ========================================== - Hits 518 516 -2 + Misses 29 23 -6 + Partials 13 9 -4 ``` | [Flag](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | Coverage Δ | | |---|---|---| | [3.10](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.97% <100.00%> (+1.65%)` | :arrow_up: | | [3.11](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.97% <100.00%> (+1.65%)` | :arrow_up: | | [3.6](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.97% <100.00%> (+1.65%)` | :arrow_up: | | [3.7](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.97% <100.00%> (+1.65%)` | :arrow_up: | | [3.8](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.97% <100.00%> (+1.65%)` | :arrow_up: | | [3.9](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.97% <100.00%> (+1.65%)` | :arrow_up: | | [macos-latest](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.97% <100.00%> (+1.65%)` | :arrow_up: | | [ubuntu-20.04](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.97% <100.00%> (+1.65%)` | :arrow_up: | | [ubuntu-latest](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.97% <100.00%> (+1.65%)` | :arrow_up: | | [windows-latest](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/27/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.97% <100.00%> (+1.65%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

anis-campos commented 7 months ago

@stdedos , sorry if I overstepped with my last commit. I did it as I was a little confused by the non-deterministic state of the dependencies (specially pylint, where the CI was using v3 and my local vas using v2).

let me know if I should place it in another PR

stdedos commented 7 months ago

Uuum, definitely some changes need to be rationalized to be merged in this PR 😅

I'll try to review quickly tonight. However, even if this gets accepted as-is, release will happen earliest Monday (I don't want to give weekend surprises to anyone 😅)

stdedos commented 7 months ago

Yeah, I have "quite a few" questions wrt https://github.com/pylint-dev/pylint-pytest/pull/27/commits/87baf06518a211f0aa6826d130d258473f8e5622. Definitely I do not think it belongs to this PR.

Please force-push revert it, so we can merge this.

OTOH, thank you very much for showing this: It was a mash-up of TILs for me 🙃
And one of them (constraints) would've been a lot helpful ... 1-2y ago 😅

anis-campos commented 7 months ago

Yeah, I have "quite a few" questions wrt 87baf06. Definitely I do not think it belongs to this PR.

Please force-push revert it, so we can merge this.

OTOH, thank you very much for showing this: It was a mash-up of TILs for me 🙃 And one of them (constraints) would've been a lot helpful ... 1-2y ago 😅

Ok, done. I will re-submit the dependency management part in a later PR, let's just keep in mind that some differences might show up in between local and CI depending of the dependencies version, specially pylint v2/v3.