Skip to content

Commit

Permalink
pre-commit: Add ruff format and flake8, isort, pyupgrade through ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork committed Oct 19, 2024
1 parent e8bd306 commit d086e82
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
!*.py
!*.rst
!*.sh
!*.toml
!*.txt
!*.yml
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ repos:
rev: v1.0.1
hooks:
- id: rst-linter

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
hooks:
- id: ruff
args:
- --fix
- id: ruff-format
16 changes: 16 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
indent-width = 4
line-length = 99
target-version = "py39"

[lint]
select = [
"C90", # mccabe
"E", # pycodestyle
"F", # Pyflakes + flake8
"I", # isort
"UP", # pyupgrade
"W", # pycodestyle
]
ignore = [
"UP031", # Use format specifiers instead of percent format; TODO drop
]

0 comments on commit d086e82

Please sign in to comment.