Revert adding toml and jupyter (#45)
See https://github.com/astral-sh/ruff-pre-commit/issues/44#issuecomment-1629510474
This commit is contained in:
parent
89791c7aee
commit
d87e2b0f73
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -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
|
||||||
|
|
||||||
|
11
README.md
11
README.md
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user