diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..8ccce9f40 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: check-ast + - id: check-builtin-literals + - id: end-of-file-fixer + - id: trailing-whitespace + + - repo: https://github.com/python/black + rev: 20.8b1 + hooks: + - id: black + language_version: python3 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..7facaff7f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,17 @@ +[tool.black] +line-length = 99 +target-version = ['py27', 'py35', 'py36', 'py37', 'py38'] +exclude = ''' +/( + \.eggs + | \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist +)/ +''' diff --git a/requirements_dev.txt b/requirements_dev.txt index 2875c043e..2f8ac1660 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -10,6 +10,7 @@ pytest pytest-runner pytest-cov coverage +pre-commit flake8 #deployment