Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: mention that python requirements need to be specified using ful…
…l address from the root (#21293) It may be not so obvious that referring to the Python requirements using their "regular" path produced by the `list` goal will not be compatible with the format expected in the `[tool].requirements` field, see https://www.pantsbuild.org/2.21/reference/subsystems/ruff#requirements: ``` $ pants list 3rdparty/python | grep "flake8" 3rdparty/python:flake8#flake8 ... ``` The target should be referred to as `requirements = ["//3rdparty/python:flake8"]`. If it's not (e.g. using `3rdparty/python:flake8`), then an error is raised: ``` $ pants lint :: ... ValueError: Invalid requirement '3rdparty/python:flake8': Parse error at "'/python'": Expected string_end ``` The reqs might be in the form of VCS requirements that resembles the addresses (with colons in between), see https://pip.pypa.io/en/stable/topics/vcs-support/. So the // prefix is to help to differentiate between those.
- Loading branch information