diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index beabf0a..4d2eaf4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,3 +24,11 @@ repos: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.7.0 + hooks: + - id: ruff + args: + - --fix + - id: ruff-format diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000..9ef33d1 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,12 @@ +indent-width = 4 +line-length = 100 +target-version = "py39" + +[lint] +select = [ + "E", # pycodestyle + "F", # Pyflakes + flake8 + "I", # isort + "UP", # pyupgrade + "W", # pycodestyle +]