Skip to content

Commit

Permalink
Align tool.setuptools.dynamic.optional-dependencies with `project.o…
Browse files Browse the repository at this point in the history
…ptional-dependencies` (#170)
  • Loading branch information
abravalheri authored May 7, 2024
2 parents 2d5e8d3 + b1d99d8 commit dfcb47c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/validate_pyproject/plugins/setuptools.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
"dependencies": {"$ref": "#/definitions/file-directive-for-dependencies"},
"optional-dependencies": {
"type": "object",
"propertyNames": {"type": "string", "format": "python-identifier"},
"propertyNames": {"type": "string", "format": "pep508-identifier"},
"additionalProperties": false,
"patternProperties": {
".+": {"$ref": "#/definitions/file-directive-for-dependencies"}
Expand Down
7 changes: 7 additions & 0 deletions tests/examples/setuptools/10-pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[project]
name = "myproj"
version = "42"
dynamic = ["optional-dependencies"]

[tool.setuptools.dynamic.optional-dependencies]
name-with-hyfens = {file = "extra.txt"}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
`tool.setuptools.dynamic.optional-dependencies` keys must be named by:

{type: string, format: 'python-identifier'}
{type: string, format: 'pep508-identifier'}

0 comments on commit dfcb47c

Please sign in to comment.