I'm curious about a line from <python_requirements...
# general
f
I'm curious about a line from python_requirements
If the
project.optional-dependencies
table is included, Pants will save the key/name of the optional dependency group as a tag on the generated
python_requirement
.
My first assumption was to expect that I would be able to select any optional dependencies from my pyproject.toml file
Copy code
[project.optional-dependencies]
dev = [
  "black>=22.8.0,<23.0.0",
]
using something like
pants --tag=dev list ::
but it doesn't seem to work. In fact running
pants peek
I find
Copy code
$ pants peek 3rdparty/python:reqs#black
[
  {
    "address": "3rdparty/python:reqs#black",
    "target_type": "python_requirement",
    "_find_links": [],
    "dependencies": [
      "3rdparty/python/pyproject.toml:reqs",
      "3rdparty/python/uv.lock:_universal_resolve_lockfile"
    ],
    "dependencies_raw": [
      "3rdparty/python/pyproject.toml:reqs",
      "3rdparty/python/uv.lock:_universal_resolve_lockfile"
    ],
    "description": null,
    "entry_point": null,
    "goals": [
      "run"
    ],
    "modules": null,
    "requirements": [
      "black<23.0.0,>=22.8.0"
    ],
    "resolve": null,
    "tags": null,
    "type_stub_modules": null
  }
]
that there are indeed no tags on this target. Am I misunderstanding the intention of that line from the reference docs?
My goal would be to be able to configure visibility rules that prevent me from accidentally including a "dev dependency" into my production releases