-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add validation schema for depdency-groups section
- Loading branch information
1 parent
c41b037
commit c501df5
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/poetry/core/json/schemas/dependency-groups-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"name": "dependency-groups", | ||
"type": "object", | ||
"additionalProperties": { | ||
"title": "Dependency group requirements", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"examples": [ | ||
[ | ||
"attrs", | ||
"requests ~= 2.28" | ||
] | ||
] | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/fixtures/project_with_invalid_dependency_groups/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[dependency-groups] | ||
testing = [ | ||
"pytest", | ||
["pytest-cov", {version = ">=4.0"}], | ||
] | ||
|
||
[tool.poetry] | ||
name = "my-package" | ||
version = "1.2.3" | ||
description = "Some description." | ||
authors = ["Awesome Hacker <[email protected]>"] | ||
license = "MIT" | ||
|
||
[tool.poetry.dependencies] | ||
|
||
[tool.poetry.extras] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters