From d8ea95b05d90b8dde12f5ff91baaabd4aaffc300 Mon Sep 17 00:00:00 2001 From: hematogender <46577620+hematogender@users.noreply.github.com> Date: Tue, 12 May 2020 14:01:58 +0300 Subject: [PATCH] Implement pre-commit hooks --- .flake8 | 10 ++++++++++ .pre-commit-config.yaml | 9 +++++++++ .style.yapf | 5 +++++ 3 files changed, 24 insertions(+) create mode 100644 .flake8 create mode 100644 .pre-commit-config.yaml create mode 100644 .style.yapf diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..5c3fab3 --- /dev/null +++ b/.flake8 @@ -0,0 +1,10 @@ +[flake8] + +max-line-length = 99 +select = C,E,F,W,B,B950 +ignore = E203, E266, E731, E501, W503, F401, F403, F405 +exclude = + .git + .github + __pycache__ + docs diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..5ac36da --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,9 @@ +repos: +- repo: https://github.com/pre-commit/mirrors-yapf + rev: v0.30.0 + hooks: + - id: yapf +- repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.0 + hooks: + - id: flake8 diff --git a/.style.yapf b/.style.yapf new file mode 100644 index 0000000..a3a5528 --- /dev/null +++ b/.style.yapf @@ -0,0 +1,5 @@ +[style] + +based_on_style = pep8 +column_limit = 99 +split_before_arithmetic_operator=true