-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read the
[project.optional-dependencies]
and [dependency-groups]
…
…tables (#66) I'd quite like to use `ruff-action`'s auto-detection feature, but it currently doesn't read the `[project.optional-dependency]` table, and support for the PEP 735 `[dependency-groups]` table is currently limited to only the special-cased `dev` key, and does not account for the possibility of `{include-group="..."}` inline tables, as [described by the PEP](https://peps.python.org/pep-0735/#dependency-group-include). I have guessed how to make the tests work, as the only JS development I do is plain JS (sans frameworks), so TypeScript is still quite new to me -- feel free to push required changes to this branch. A
- Loading branch information
Showing
12 changed files
with
105 additions
and
10 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
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
Empty file.
22 changes: 22 additions & 0 deletions
22
__tests__/fixtures/pyproject-dependency-groups-project/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,22 @@ | ||
[project] | ||
name = "pyproject-dependency-groups-project" | ||
version = "0.1.0" | ||
description = "Add your description here" | ||
readme = "README.md" | ||
requires-python = ">=3.12" | ||
|
||
[dependency-groups] | ||
dev = [ | ||
{ include-group = "docs" }, | ||
{ include-group = "lint" }, | ||
] | ||
docs = [ | ||
"sphinx", | ||
] | ||
lint = [ | ||
"ruff==0.8.3", | ||
] | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" |
2 changes: 2 additions & 0 deletions
2
...ures/pyproject-dependency-groups-project/src/pyproject_dependency_dev_project/__init__.py
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,2 @@ | ||
def hello() -> str: | ||
return "Hello from python-project!" |
1 change: 1 addition & 0 deletions
1
...s/pyproject-dependency-groups-project/src/pyproject_dependency_dev_project/hello_world.py
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 @@ | ||
print("Hello world!") |
Empty file.
15 changes: 15 additions & 0 deletions
15
__tests__/fixtures/pyproject-optional-dependencies-project/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,15 @@ | ||
[project] | ||
name = "pyproject-optional-dependencies-project" | ||
version = "0.1.0" | ||
description = "Add your description here" | ||
readme = "README.md" | ||
requires-python = ">=3.12" | ||
|
||
[project.optional-dependencies] | ||
lint = [ | ||
"ruff==0.8.3", | ||
] | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" |
2 changes: 2 additions & 0 deletions
2
.../pyproject-optional-dependencies-project/src/pyproject_dependency_dev_project/__init__.py
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,2 @@ | ||
def hello() -> str: | ||
return "Hello from python-project!" |
1 change: 1 addition & 0 deletions
1
...project-optional-dependencies-project/src/pyproject_dependency_dev_project/hello_world.py
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 @@ | ||
print("Hello world!") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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