From 576fa125ff3b15e9766f606223541a36721b70fa Mon Sep 17 00:00:00 2001 From: Korbinian Koch Date: Fri, 31 May 2024 14:31:37 +0200 Subject: [PATCH] add pre-commit hook --- .flake8 | 5 +++++ tensorhue/.pre-commit-config.yaml | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .flake8 create mode 100644 tensorhue/.pre-commit-config.yaml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..1616833 --- /dev/null +++ b/.flake8 @@ -0,0 +1,5 @@ +[flake8] +ignore = E203, E266, E501, W503, F403, F401 +max-line-length = 120 +max-complexity = 18 +select = B,C,E,F,W,T4,B9 \ No newline at end of file diff --git a/tensorhue/.pre-commit-config.yaml b/tensorhue/.pre-commit-config.yaml new file mode 100644 index 0000000..05fb109 --- /dev/null +++ b/tensorhue/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace +- repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v1.2.3 + hooks: + - id: flake8 \ No newline at end of file