Revert adding toml and jupyter (#45)

See
https://github.com/astral-sh/ruff-pre-commit/issues/44#issuecomment-1629510474
This commit is contained in:
Ali Hamdan 2023-07-10 21:03:43 +02:00 committed by GitHub
parent 89791c7aee
commit d87e2b0f73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -27,7 +27,7 @@ jobs:
git config user.name 'Github Actions' git config user.name 'Github Actions'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
- run: pre-commit-mirror --language python --package-name ruff --entry 'ruff check --force-exclude' --id ruff --types-or python --types-or pyi --types-or jupyter --types-or toml --require-serial --description "Run 'ruff' for extremely fast Python linting" . - run: pre-commit-mirror --language python --package-name ruff --entry 'ruff check --force-exclude' --id ruff --types-or python --types-or pyi --require-serial --description "Run 'ruff' for extremely fast Python linting" .
- run: git push origin HEAD:refs/heads/main --tags - run: git push origin HEAD:refs/heads/main --tags

View File

@ -34,6 +34,17 @@ Or, to enable autofix:
args: [--fix, --exit-non-zero-on-fix] args: [--fix, --exit-non-zero-on-fix]
``` ```
To run the hook on Jupyter Notebooks too:
```yaml
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.277
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
```
Ruff's pre-commit hook should be placed after other formatting tools, such as Black and isort, 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, _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 and other formatting tools, as Ruff's autofix behavior can output code changes that require