diff --git a/.gitignore b/.gitignore index 1568c6c..bfe4e50 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ tmp .vscode *.log .ropeproject +.ruff_cache diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..f48374e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-yaml + - id: check-toml + - id: check-ast + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.1.6 + hooks: + - id: ruff + args: [--fix, --exit-non-zero-on-fix, .] + types: [python] + - id: ruff-format + args: [.] + types: [python] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6fb499b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[tool.ruff] +line-length = 100 + +[tool.ruff.format] +quote-style = "single" +indent-style = "space" + +[tool.ruff.lint] +select = [ + # pycodestyle + "E", + # Pyflakes + "F", + # pyupgrade + "UP", + # flake8-bugbear + "B", + # flake8-simplify + "SIM", + # isort + "I", +]