Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ repos:
# Ruff version.
rev: v0.9.9
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
```

To enable lint fixes, add the `--fix` argument to the lint hook:
Expand All @@ -36,11 +36,11 @@ repos:
# Ruff version.
rev: v0.9.9
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
```

To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed filetypes:
Expand All @@ -51,13 +51,13 @@ repos:
# Ruff version.
rev: v0.9.9
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
# Run the linter.
- id: ruff
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
```

When running with `--fix`, Ruff's lint hook should be placed _before_ Ruff's formatter hook, and
Expand Down