diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e620b1b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{py,yaml,yml}] +indent_style = space + +[*.{yaml,yml}] +indent_size = 2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..b820aa6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,48 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: fix-byte-order-marker + - id: fix-encoding-pragma + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + - id: mixed-line-ending + args: + - "--fix=lf" + - id: check-yaml + - id: check-json + - id: check-added-large-files + - id: check-case-conflict + - id: check-merge-conflict + - id: check-symlinks + - id: destroyed-symlinks + - id: detect-private-key + + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python + rev: 2.3.54 + hooks: + - id: editorconfig-checker + + - repo: https://github.com/PyCQA/flake8 + rev: 4.0.1 + hooks: + - id: flake8 + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v0.910-1 + hooks: + - id: mypy + + - repo: https://github.com/psf/black + rev: 21.9b0 + hooks: + - id: black + + - repo: https://github.com/PyCQA/isort + rev: 5.9.3 + hooks: + - id: isort diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f9808e9 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "python.linting.mypyEnabled": true, + "python.formatting.provider": "black", + "editor.formatOnSave": true, + "python.linting.flake8Enabled": true +} diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..21be829 --- /dev/null +++ b/tox.ini @@ -0,0 +1,6 @@ +[flake8] +max-line-length = 88 +extend-ignore = E203, I201 + +[tool.isort] +profile = "black"