Collect the requirements that become a package's published metadata. Args: project: The ``[project]`` table of a parsed ``pyproject.toml``. Returns: The core runtime dependencies plus every optional-dependency group — exactly the requirements emitted as ``Requires-D
(project: dict)
| 209 | |
| 210 | |
| 211 | def _published_dependencies(project: dict) -> list[str]: |
| 212 | """Collect the requirements that become a package's published metadata. |
| 213 | |
| 214 | Args: |
| 215 | project: The ``[project]`` table of a parsed ``pyproject.toml``. |
| 216 | |
| 217 | Returns: |
| 218 | The core runtime dependencies plus every optional-dependency group — exactly the |
| 219 | requirements emitted as ``Requires-Dist``. Dependency groups (PEP 735) are excluded |
| 220 | because they are development-only and never published. |
| 221 | """ |
| 222 | deps = list(project.get("dependencies", [])) |
| 223 | for group in project.get("optional-dependencies", {}).values(): |
| 224 | deps.extend(group) |
| 225 | return deps |
| 226 | |
| 227 | |
| 228 | def _local_dev_sources( |
no test coverage detected