-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from opengisch/ruff
Add `ruff` configuration instead of flake
- Loading branch information
Showing
4 changed files
with
12 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,29 @@ | ||
repos: | ||
# Fix end of files | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: | ||
- '--fix=lf' | ||
|
||
# Remove unused imports/variables | ||
- repo: https://github.com/myint/autoflake | ||
rev: v1.4 | ||
# Lint and format | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.4 | ||
hooks: | ||
- id: autoflake | ||
args: | ||
- "--in-place" | ||
- "--remove-all-unused-imports" | ||
- "--remove-unused-variables" | ||
- "--exclude=__init__.py" | ||
|
||
# Sort imports | ||
- repo: https://github.com/pycqa/isort | ||
rev: "5.12.0" | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] | ||
# Run the linter. | ||
- id: ruff | ||
args: [ --fix ] | ||
|
||
# Black formatting | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
|
||
# Lint files | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: "3.9.0" | ||
hooks: | ||
- id: flake8 | ||
# Run the formatter. | ||
- id: ruff-format | ||
|
||
# Static type-checking with mypy | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 'v1.3.0' | ||
rev: 'v1.10.0' | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters