Skip to content

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

Closed
@webknjaz

Description

@webknjaz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions