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

fix is pytest fixture #2

Closed anis-campos closed 10 months ago

anis-campos commented 10 months ago

currently, both fixture in this example are flagged has not fixtures

from pytest import fixture

@fixture
def my_fixture(): pass

@fixture(name="foo")
def my_fixture_2(): pass

This is due to the different semantics in astroid when using import pytest or from pytest import ...

codecov[bot] commented 10 months ago

Welcome to Codecov :tada:

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered :open_umbrella:

stdedos commented 10 months ago

Tests can be ignored (somehow Ubuntu per-Python runners pick up 3.12!!!), and coverage too (https://github.com/pylint-dev/pylint-pytest/pull/14 + tests/input is considered, but AFAIK we never call them).

@anis-campos, do you want to fix the pylint issue? Or should we?

anis-campos commented 10 months ago

Tests can be ignored (somehow Ubuntu per-Python runners pick up 3.12!!!), and coverage too (#14 + tests/input is considered, but AFAIK we never call them).

@anis-campos, do you want to fix the pylint issue? Or should we?

thanks for the tips. It should be fine now

stdedos commented 10 months ago

I ... might ask you to rebase one more time after https://github.com/pylint-dev/pylint-pytest/pull/18 lands (or I can do it myself; up to you 🙃) 😅

Otherwise looks good.

Before merging, I will also merge https://github.com/pylint-dev/pylint-pytest/pull/17 - so that we can have one bugfix between functional changes.

anis-campos commented 10 months ago

I ... might ask you to rebase one more time after #18 lands (or I can do it myself; up to you 🙃) 😅

Otherwise looks good.

Before merging, I will also merge #17 - so that we can have one bugfix between functional changes.

feel free to rebase if needed. thanks for the heads up