From 143f0a566ff7f309839fb1a137b5b19c6f808fbe Mon Sep 17 00:00:00 2001 From: Aleksey Lobanov Date: Thu, 7 Jan 2021 22:34:27 +0300 Subject: [PATCH] dev: pre-commit config --- .pre-commit-config.yaml | 13 +++++++++++++ pyproject.toml | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..96943c4 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black + language_version: python3 # Should be a command that runs python3.6+ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..18a59d9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,23 @@ +[tool.black] +line-length = 100 +target-version = ['py38'] +include = '\.pyi?$' +exclude = ''' +/( + \.eggs + | \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist + + # The following are specific to Black, you probably don't want those. + | blib2to3 + | tests/data + | profiling +)/ +'''