Closed mtelka closed 3 weeks ago
Hello @jaraco and @mtelka,
I prepared a solution and it works for me locally https://github.com/coherent-oss/pytest-flake8/pull/4
@jaraco
Could you prepare instructions in the README.md on how to work with this project as a developer?
Could you add some annotations to README.md about it?
Documentation is updated in the same PR.
I believe this is fixed in v1.3.0. Please test and confirm and close. Thanks.
Yes, it works. Thank you!
Test results with flake8==7.1.1
:
py39: remove tox env folder /data/builds/oi-userland/components/python/pytest-flake8/build/amd64-3.9/.tox/py39
py39: commands[0]> python -m pytest
============================= test session starts ==============================
platform sunos5 -- Python 3.9.20, pytest-8.3.3, pluggy-1.5.0 -- /data/builds/oi-userland/components/python/pytest-flake8/build/amd64-3.9/.tox/py39/bin/python
cachedir: .tox/py39/.pytest_cache
rootdir: /data/builds/oi-userland/components/python/pytest-flake8/build/amd64-3.9
configfile: pytest.ini
plugins: checkdocs-2.13.0, enabler-3.3.0, flake8-1.3.0, mypy-0.10.3, cov-6.0.0
collecting ... collected 14 items
.::project PASSED [ 7%]
.::project PASSED [ 7%]
tests/test_flake8.py::TestIgnores::test_ignores PASSED [ 14%]
tests/test_flake8.py::TestIgnores::test_default_flake8_ignores XFAIL [ 21%]
tests/test_flake8.py::TestIgnores::test_ignores_all PASSED [ 28%]
tests/test_flake8.py::TestIgnores::test_w293w292 PASSED [ 35%]
tests/test_flake8.py::TestIgnores::test_mtime_caching PASSED [ 42%]
tests/test_flake8.py::test_extensions PASSED [ 50%]
tests/test_flake8.py::test_ok_verbose PASSED [ 57%]
tests/test_flake8.py::test_keyword_match PASSED [ 64%]
tests/test_flake8.py::test_run_on_init_file PASSED [ 71%]
tests/test_flake8.py::test_unicode_error PASSED [ 78%]
tests/test_flake8.py::test_strict XFAIL (flake8 is not properly regi...) [ 85%]
tests/test_flake8.py::test_junit_classname PASSED [ 92%]
=============================== warnings summary ===============================
tests/test_flake8.py: 12 warnings
/data/builds/oi-userland/components/python/pytest-flake8/build/amd64-3.9/pytest_flake8.py:62: PytestRemovedIn9Warning: The (path: py.path.local) argument is deprecated, please use (file_path: pathlib.Path)
see https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
def pytest_collect_file(file_path, path, parent):
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
---------- coverage: platform sunos5, python 3.9.20-final-0 ----------
Name Stmts Miss Cover Missing
------------------------------------------------------------------------------------------------------------
/tmp/pytest-of-marcel/pytest-4/test_junit_classname0/test_junit_classname.py 0 0 100%
/tmp/pytest-of-marcel/pytest-4/test_keyword_match0/test_keyword_match.py 2 1 50% 2
/tmp/pytest-of-marcel/pytest-4/test_mtime_caching0/test_mtime_caching.py 2 0 100%
/tmp/pytest-of-marcel/pytest-4/test_ok_verbose0/test_ok_verbose.py 2 0 100%
/tmp/pytest-of-marcel/pytest-4/test_strict0/test_strict.py 0 0 100%
/tmp/pytest-of-marcel/pytest-4/test_w293w2920/test_w293w292.py 2 0 100%
docs/conf.py 16 0 100%
pytest_flake8.py 135 33 76% 3-15, 47, 62, 81, 87-92, 111, 115-116, 127, 131, 137, 170, 175, 183-184, 195, 200, 203, 213, 219, 221, 223, 225, 227
tests/test_flake8.py 92 1 99% 63
------------------------------------------------------------------------------------------------------------
TOTAL 251 35 86%
================= 12 passed, 2 xfailed, 12 warnings in 21.22s ==================
py39: OK (21.99=setup[0.04]+cmd[21.95] seconds)
congratulations :) (22.50 seconds)
The
flake8
dependency is currently pinned to< 6
. It would be great if there is full support forflake8
version 7.