Skip to content

Commit

Permalink
fix: add pixi support for PY007
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii authored Sep 20, 2024
1 parent 3daf6dd commit ccf04ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sp_repo_review/checks/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def check(root: Traversable) -> bool:


class PY007(General):
"Supports an easy task runner (nox or tox)"
"Supports an easy task runner (nox, tox, pixi, etc.)"

url = mk_url("tasks")

Expand All @@ -119,13 +119,17 @@ def check(root: Traversable, pyproject: dict[str, Any]) -> bool:
return True
if root.joinpath("tox.ini").is_file():
return True
if root.joinpath("pixi.toml").is_file():
return True
match pyproject.get("tool", {}):
case {"hatch": {"envs": object()}}:
return True
case {"spin": object()}:
return True
case {"tox": object()}:
return True
case {"pixi": {"tasks": object()}}:
return True
case _:
return False

Expand Down

0 comments on commit ccf04ec

Please sign in to comment.