Go to file
Ali Hamdan 89791c7aee
Add jupyter and toml file types (#44)
## Summary

Add `jupyter` to the file types that ruff pre-commit hook runs on

## Test Plan

This is what pre-commit uses to identify ".ipynb" files. See
dc75a76b7f/identify/extensions.py (L100)
Also black does this
https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml

Fixes #43
2023-07-09 15:37:19 -04:00
.github Add jupyter and toml file types (#44) 2023-07-09 15:37:19 -04:00
.gitignore Initial commit 2022-09-19 20:52:36 -06:00
.pre-commit-hooks.yaml Add check to entry (#32) 2023-03-02 10:24:35 -05:00
.version Mirror: 0.0.277 2023-07-04 21:55:36 +00:00
LICENSE Initial commit 2022-09-19 20:52:36 -06:00
README.md Bump README.md version to 0.0.277 2023-07-04 21:55:37 +00:00
setup.py Mirror: 0.0.277 2023-07-04 21:55:36 +00:00
update_version.py Update update_version.py 2023-06-20 16:40:23 -04:00

ruff-pre-commit

Ruff image image image Actions status

A pre-commit hook for Ruff.

Distributed as a standalone repository to enable installing Ruff via prebuilt wheels from PyPI.

Using Ruff with pre-commit

Add this to your .pre-commit-config.yaml:

- repo: https://github.com/astral-sh/ruff-pre-commit
  # Ruff version.
  rev: v0.0.277
  hooks:
    - id: ruff

Or, to enable autofix:

- repo: https://github.com/astral-sh/ruff-pre-commit
  # Ruff version.
  rev: v0.0.277
  hooks:
    - id: ruff
      args: [--fix, --exit-non-zero-on-fix]

Ruff's pre-commit hook should be placed after other formatting tools, such as Black and isort, unless you enable autofix, in which case, Ruff's pre-commit hook should run before Black, isort, and other formatting tools, as Ruff's autofix behavior can output code changes that require reformatting.

License

MIT