Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9413e8b

Browse files
committed
fix: add pixi support for PY007
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 3daf6dd commit 9413e8b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ for family, grp in itertools.groupby(collected.checks.items(), key=lambda x: x[1
318318
- [`PY004`](https://learn.scientific-python.org/development/guides/packaging-simple#PY004): Has docs folder
319319
- [`PY005`](https://learn.scientific-python.org/development/guides/packaging-simple#PY005): Has tests folder
320320
- [`PY006`](https://learn.scientific-python.org/development/guides/style#PY006): Has pre-commit config
321-
- [`PY007`](https://learn.scientific-python.org/development/guides/tasks#PY007): Supports an easy task runner (nox or tox)
321+
- [`PY007`](https://learn.scientific-python.org/development/guides/tasks#PY007): Supports an easy task runner (nox, tox, pixi, etc.)
322322

323323
### PyProject
324324
- [`PP002`](https://learn.scientific-python.org/development/guides/packaging-simple#PP002): Has a proper build-system table

src/sp_repo_review/checks/general.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def check(root: Traversable) -> bool:
104104

105105

106106
class PY007(General):
107-
"Supports an easy task runner (nox or tox)"
107+
"Supports an easy task runner (nox, tox, pixi, etc.)"
108108

109109
url = mk_url("tasks")
110110

@@ -119,13 +119,17 @@ def check(root: Traversable, pyproject: dict[str, Any]) -> bool:
119119
return True
120120
if root.joinpath("tox.ini").is_file():
121121
return True
122+
if root.joinpath("pixi.toml").is_file():
123+
return True
122124
match pyproject.get("tool", {}):
123125
case {"hatch": {"envs": object()}}:
124126
return True
125127
case {"spin": object()}:
126128
return True
127129
case {"tox": object()}:
128130
return True
131+
case {"pixi": {"tasks": object()}}:
132+
return True
129133
case _:
130134
return False
131135

0 commit comments

Comments
 (0)