From b0742ba608500f63caf256f46451c5e8c8694a06 Mon Sep 17 00:00:00 2001 From: Hanif Birgani Date: Thu, 2 Sep 2021 16:45:32 +0430 Subject: [PATCH 1/2] Add black configurations. related to #36 --- pyproject.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..eefb6105 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,17 @@ +[tool.black] +line-length = 79 +include = '\.pyi?$' +exclude = ''' +/( + \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | activate + | _build + | buck-out + | build + | dist +)/ +''' From 3d45077ee8d2b0dd9ef8283a6f184ede0875c865 Mon Sep 17 00:00:00 2001 From: Hanif Birgani Date: Thu, 2 Sep 2021 16:47:12 +0430 Subject: [PATCH 2/2] Add pre-commit config Add pre-commit config file to run isort, black and flake8 before each commit. related to #36 --- .pre-commit-config.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..8ce2c27d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +repos: + - repo: https://github.com/pycqa/isort + rev: 5.9.3 + hooks: + - id: isort + - repo: https://github.com/psf/black + rev: 21.8b0 + hooks: + - id: black + - repo: https://github.com/pycqa/flake8 + rev: 3.9.2 + hooks: + - id: flake8