Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a pre-commit config and associated config files and fixes the issues raised. This has been added in advance of ruff-format docs (PR number TBC) so to reduce the changes introduced in that PR.
The hooks added are as follows with the ones that match the main ruff repo marked
check-hooks-apply
- Check that all hooks remain relevant to the repo over timecheck-useless-excludes
- Check that all excludes are relevant to the repocheck-case-conflict
- Check for files with names that would conflict on a case-insensitive filesystemend-of-file-fixer
- Standardises all files with a new line at the endtrailing-whitespace
- Trims extra whitespace in all filesvalidate-pyproject
(In Ruff repo)mdformat
(In Ruff repo)markdownlint-fix
(In Ruff repo)blacken-docs
(In Ruff repo)typos
(In Ruff repo)mypy
- Type checks python coderuff
(In Ruff repo)ruff-format
(In Ruff repo) - Order swapped to match the read me in this repoprettier
(In Ruff repo)zizmor
(In Ruff repo)check-github-workflows
(In Ruff repo)actionlint
(In Ruff repo)Test Plan
Check that the new CI check passes.