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 for pylint 3 & python 3.12 #22

Closed irtazaakram closed 9 months ago

irtazaakram commented 10 months ago

Hi,

This PR

Can we please have a new release after this PR is merged.

Thanks,

Fixes https://github.com/pylint-dev/pylint-pytest/issues/11 Fixes https://github.com/pylint-dev/pylint-pytest/issues/12

irtazaakram commented 10 months ago

Hi @stdedos, can you please review this. Thanks,

codecov[bot] commented 10 months ago

Codecov Report

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

Comparison is base (e73cc2f) 92.03% compared to head (d5c61a8) 91.96%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #22 +/- ## ========================================== - Coverage 92.03% 91.96% -0.07% ========================================== Files 18 18 Lines 527 523 -4 Branches 99 99 ========================================== - Hits 485 481 -4 Misses 29 29 Partials 13 13 ``` | [Flag](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/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/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `91.77% <ø> (-0.07%)` | :arrow_down: | | [3.11](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `91.77% <ø> (-0.07%)` | :arrow_down: | | [3.12](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `91.77% <ø> (?)` | | | [3.6](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `?` | | | [3.7](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `?` | | | [3.8](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `91.77% <ø> (-0.07%)` | :arrow_down: | | [3.9](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `91.77% <ø> (-0.07%)` | :arrow_down: | | [macos-latest](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `91.77% <ø> (-0.07%)` | :arrow_down: | | [ubuntu-20.04](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `?` | | | [ubuntu-latest](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `91.77% <ø> (-0.07%)` | :arrow_down: | | [windows-latest](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `91.77% <ø> (-0.07%)` | :arrow_down: | 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. | [Files](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | Coverage Δ | | |---|---|---| | [pylint\_pytest/checkers/class\_attr\_loader.py](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev#diff-cHlsaW50X3B5dGVzdC9jaGVja2Vycy9jbGFzc19hdHRyX2xvYWRlci5weQ==) | `92.85% <ø> (-0.48%)` | :arrow_down: | | [pylint\_pytest/checkers/fixture.py](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/22?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev#diff-cHlsaW50X3B5dGVzdC9jaGVja2Vycy9maXh0dXJlLnB5) | `90.29% <ø> (-0.19%)` | :arrow_down: |

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

stdedos commented 10 months ago

The v2.0 I'm estimating to be released mid-November

Setting this as blocked

stdedos commented 10 months ago

For the failing actions, you might want to revert b3e8974b729e9dbb2d34cc9ef6c65a0595e1faa6

irtazaakram commented 10 months ago

Hi @stdedos, Thank you for taking time to review this PR. Much appreciated.

stdedos commented 10 months ago

Thank you for offering the code @irtazaakram ❤️

irtazaakram commented 10 months ago

hi @stdedos, do you know what happened here? I see the banner Pull request successfully merged and closed and it aslo says I closed it even though i never did?

stdedos commented 10 months ago

That is ... interesting 😕

All I can see is this

image

Something-something with your force-pushes, but I must run for now and I haven't checked what happened there 😅

irtazaakram commented 10 months ago

🤦🏻 let me know if i should open a new PR? as I am also not able to reopen it.

stdedos commented 10 months ago

I think it should be something obvious we are both missing

Also, GitHub is somewhat too magic sometimes for my taste 😅

irtazaakram commented 10 months ago

hey @stdedos, I mistakenly forced pushed commit without any changes while trying to revert https://github.com/pylint-dev/pylint-pytest/commit/b3e8974b729e9dbb2d34cc9ef6c65a0595e1faa6 🤦🏻 and thats what caused this PR to close.

PR is ready now. Let me know if there are any changes that you want to suggest.

again apologies for this.

Thank you

stdedos commented 10 months ago

Hey @irtazaakram

pre-commit says this:

image (https://results.pre-commit.ci/run/github/602434841/1698218743.HAiZ2fOQR3-yD9koSvOV5w)

You'd have to either apply the changes, or allow pre-commit to apply those changes 😕

irtazaakram commented 10 months ago

These changes causes tests to fail for python 3.8 & 3.9

stdedos commented 10 months ago

https://github.com/pylint-dev/pylint-pytest/actions/runs/6637112680/job/18031541929?pr=22

I will eventually handle some of those pylint issues

stdedos commented 10 months ago

The MR looks solid - and we need to figure out a solution for Windows-testing.

Amazing job @irtazaakram 🚀

Pierre-Sassoulas commented 9 months ago

I can't write directly on this branch but the fix for pylint's check is this: https://github.com/pylint-dev/pylint-pytest/commit/904e2e9b374de865caebde35e2e92a484c54147c

Pierre-Sassoulas commented 9 months ago

Closing in favor of two other merge requests: #23 then #24. Thank you for your work @irtazaakram I credited you in the rebased commit.