Deprecate hook name lint; add hook name ruff (#4)

This commit is contained in:
Trevor Gross 2022-10-27 17:05:41 -04:00 committed by GitHub
parent 1c077b20b0
commit 301fe68ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 3 deletions

View File

@ -22,6 +22,23 @@ jobs:
git config user.name 'Github Actions'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
- run: pre-commit-mirror --language python --package-name ruff --entry ruff --id lint --types python --description "Run ruff to lint Python files." .
- run: >
pre-commit-mirror
--language python
--package-name ruff
--entry ruff
--id ruff
--types python
--description "Run `ruff` for extremely fast Python linting" .
# Intended for removal November 2022 (1 month after deprecation)
- run: >
pre-commit-mirror
--language python
--package-name ruff
--entry ruff
--id lint
--types python
--description "Deprecated: use hook id `ruff` instead. Planned removal 2022-11-30" .
- run: git push origin HEAD:refs/heads/main --tags

View File

@ -1,6 +1,16 @@
- id: lint
- id: ruff
name: ruff
description: 'Run ruff to lint Python files.'
description: 'Run `ruff` for extremely fast Python linting'
entry: ruff
language: python
'types': [python]
args: []
require_serial: false
additional_dependencies: []
minimum_pre_commit_version: '0'
- id: lint
name: ruff
description: 'Deprecated: use hook id `ruff` instead. Planned removal 2022-11-30'
entry: ruff
language: python
'types': [python]

View File

@ -5,6 +5,21 @@ A [pre-commit](https://pre-commit.com/) hook for [ruff](https://github.com/charl
Distributed as a standalone repository to enable installing ruff via prebuilt wheels from
[PyPI](https://pypi.org/project/ruff/).
For pre-commit: see https://github.com/pre-commit/pre-commit
For ruff: see https://github.com/charliermarsh/ruff
### Using ruff with pre-commit
Add this to your `.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: '' # Use the sha / tag you want to point at
hooks:
- id: ruff
```
## License
MIT