-
Notifications
You must be signed in to change notification settings - Fork 16
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
Checks pass when run under 3.8 or later but fails on 3.6 and 3.7 #94
Comments
Hi @gaborbernat, |
I have figured out the reason why this inconsistency occurs:
As a result, under 3.7- we try to find the I am not sure how to proceed right now, will try to figure out a solution. In the meantime, the (ugly) workaround is to add a duplicate @pytest.fixture(autouse=True) # noqa: PT004 <-- add this for 3.7-
def ensure_logging_framework_not_altered() -> Iterator[None]: # noqa: PT004 <-- this was already added, works for 3.8+
... |
Do we have an issue with this in flake8? Sounds like something that should be shared across plugins (but ideally provided by flake8).
Sounds to me like you want to make the where to look for noqa dynamic based on the python version. |
I took a closer look, and it seems that flake8 did implement this at some point, so my knowledge on this is not up-to-date. Regardless of this, flake8 does suffer from the same inconsistency between Python version with some of their checks, see an example issue in their tracker. |
Bug report
When using this plugin under python3.8 or later it behaves differently than running under python3.6/python3.7.
What's wrong
Take the test project https://github.com/tox-dev/tox/tree/rewrite, using
flake8-pytest-style==1.3
. When running the flake8 test suite under python3.8 or later it passes with no errors. When running it under 3.7 or 3.6:How it should work
Consistently under all python versions.
System information
flake8-bugbear==20.11.1 flake8-comprehensions==3.3.1 flake8-pytest-style==1.3 flake8-spellcheck==0.23 flake8-unused-arguments==0.0.6 flake8==3.8.4
As discovered under tox-dev/tox#1970 by @jugmac00
The text was updated successfully, but these errors were encountered: