Skip to content

itsjohncs/rye-pre-commit

Repository files navigation

rye-pre-commit

A cross-platform pre-commit hook for rye. The hook uses the system's rye.

Using Rye with pre-commit

To run rye test and rye lock via pre-commit, add the following to your .pre-commit-config.yaml:

- repo: https://github.com/itsjohncs/rye-pre-commit
  rev: v0.2.0
  hooks:
  - id: rye-test
  - id: rye-lock

To run an abitrary rye command, you can use the rye or rye-with-filenames hooks (the latter is given the list of changed files).

- repo: https://github.com/itsjohncs/rye-pre-commit
  rev: v0.2.0
  hooks:
  - id: rye
    args: ["sync"]
  - id: rye-with-filenames
    args: ["run", "black"]

About

A pre-commit hook for rye.

Resources

License

Stars

Watchers

Forks

Languages