Using the top syntax, I get a different error:
error: Failed to parse: `pyproject.toml`
Caused by: TOML parse error at line 9, column 15
|
9 | docs = {sphinx}
| ^
trailing commas are not supported in inline tables, expected nothing
and getting this error for the bottom syntax:
error: Project `testproject` has malformed dependency groups
Caused by: Failed to find group `docs` specified in `[tool.uv.dependency-groups]`