From a47c01d8e6a9da27cc39cf4707ce50fc8dabe837 Mon Sep 17 00:00:00 2001 From: Fundor333 Date: Tue, 20 Oct 2020 16:52:42 +0200 Subject: [PATCH] Adding testing Adding testing with flask8, pre-commit and pyproject --- .flake8 | 5 +++++ .pre-commit-config.yaml | 28 ++++++++++++++++++---------- pyproject.toml | 16 ++++++++++++++++ 3 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 .flake8 create mode 100644 pyproject.toml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..d9ad0b4 --- /dev/null +++ b/.flake8 @@ -0,0 +1,5 @@ +[flake8] +ignore = E203, E266, E501, W503, F403, F401 +max-line-length = 79 +max-complexity = 18 +select = B,C,E,F,W,T4,B9 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6316716..c25c948 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,20 @@ fail_fast: true repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 - hooks: - - id: trailing-whitespace - language: python - - repo: https://github.com/asottile/blacken-docs - rev: v1.8.0 - hooks: - - id: blacken-docs - additional_dependencies: [black==19.3b0] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + language: python + - repo: https://github.com/ambv/black + rev: stable + hooks: + - id: black + language_version: python3.8 + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.7.9 + hooks: + - id: flake8 + - repo: https://github.com/asottile/blacken-docs + rev: v1.8.0 + hooks: + - id: blacken-docs diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..dfab025 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,16 @@ +[tool.black] +line-length = 79 +include = '\.pyi?$' +exclude = ''' +/( + \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist +)/ +'''