Skip to content
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

fix is pytest fixture #2

Merged
merged 2 commits into from
Oct 23, 2023
Merged

fix is pytest fixture #2

merged 2 commits into from
Oct 23, 2023

Conversation

anis-campos
Copy link

@anis-campos anis-campos commented Oct 13, 2023

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
Copy link

codecov bot commented Oct 13, 2023

Welcome to Codecov 🎉

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 ☂️

@stdedos stdedos added the bug Something isn't working label Oct 14, 2023
@stdedos stdedos added this to the Release 1.1.x milestone Oct 15, 2023
@stdedos
Copy link
Collaborator

stdedos commented Oct 18, 2023

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?

@anis-campos
Copy link
Author

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
Copy link
Collaborator

stdedos commented Oct 18, 2023

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.

@stdedos stdedos self-requested a review October 18, 2023 20:46
@anis-campos
Copy link
Author

anis-campos commented Oct 19, 2023

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

Anis Campos and others added 2 commits October 20, 2023 21:48
currently, both fixture in this example are flagged has not fixtures
```python
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 ...`
Copy link
Collaborator

@stdedos stdedos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you 🙃

@stdedos stdedos merged commit a5c6855 into pylint-dev:master Oct 23, 2023
22 checks passed
@anis-campos anis-campos deleted the fix_is_pytest_fixture branch October 23, 2023 06:37
stdedos added a commit that referenced this pull request Nov 6, 2023
* anis-campos/fix_is_pytest_fixture: #2
* stdedos/ci/pre-commit/add-MOAR: #20

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants