nedbat/scriv

[TODO][good first issue] Uncap `pylint-pytest` in the dependency lists and lock files

webknjaz opened this issue · 3 comments

It's pinned in a few files @ requirements/: https://github.com/search?q=repo%3Anedbat%2Fscriv%20pylint-pytest&type=code. This is due to reverbc/pylint-pytest#20. The original project repository has been archived but the successor is being published to PyPI under the same project name and is hosted under @pytest-dev. They've ported my PR reverbc/pylint-pytest#22 and merged it as pylint-dev/pylint-pytest#15, releasing that under v1.1.6.

I just tried it out in another project and it ended up displaying a more informative error

. (C  0), ::F6401
************* Module cheroot.test.test_conn
cheroot/test/test_conn.py:L   1:(cannot-enumerate-pytest-fixtures) pylint-pytest plugin cannot enumerate and collect pytest fixtures. Please run `pytest --fixtures --collect-only cheroot/test/test_conn.py` and resolve any potential syntax error or package dependency issues. stdout: . stderr: ERROR: usage: pylint [options] [file_or_dir] [file_or_dir] [...]
pylint: error: unrecognized arguments: --numprocesses=auto --cov=cheroot --cov-report --cov-report xml:.test-results/pytest/cov.xml ~/src/github/cherrypy/cheroot--maintenance--macos-13/cheroot/test/test_conn.py
  inifile: ~/src/github/cherrypy/cheroot--maintenance--macos-13/pytest.ini
  rootdir: ~/src/github/cherrypy/cheroot--maintenance--macos-13

which made it more obvious that I'm lacking a few pytest plugins in the env where pylint is installed.

Action items

  • Delete the plugin entry from requirements/constraints.txt along with a comment explainer
  • Regenerate requirements/dev.txt and requirements/quality.txt with pip-tools using -P pylint-pytest arg
  • Check what pylint outputs after that, fix any linting violations and perhaps add more missing deps to requirements/quality.in, repeating the previous steps

@OlenaYefymenko would you like to give it a go?

@OlenaYefymenko would you like to give it a go?

Yes, I'll solve this.

Fixed in commit 53473f0