From 3b46e402c7e60a734cdbc177842b82d4810ee899 Mon Sep 17 00:00:00 2001 From: hobogalaxy Date: Sat, 6 Mar 2021 14:08:16 +0100 Subject: [PATCH] add .pre-commit-config.yaml --- .pre-commit-config.yaml | 45 +++++++++++++++++++++++++++++++++++++++++ requirements.txt | 7 +++---- 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a460cde --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,45 @@ +default_language_version: + python: python3.8 + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + # supported hooks: https://pre-commit.com/hooks.html + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + - id: double-quote-string-fixer + - id: debug-statements + - id: detect-private-key + - id: check-yaml + - id: check-added-large-files + - id: check-merge-conflict + + - repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black + +# - repo: https://github.com/PyCQA/isort +# rev: 5.7.0 +# hooks: +# - id: isort +# # profiles: https://pycqa.github.io/isort/docs/configuration/profiles/ +# # other flags: https://pycqa.github.io/isort/docs/configuration/options/ +# args: [--profile, black] + +# - repo: https://github.com/pre-commit/mirrors-yapf +# rev: v0.30.0 +# hooks: +# - id: yapf +# args: [--parallel, --in-place] + +# - repo: https://gitlab.com/pycqa/flake8 +# rev: 3.7.9 +# hooks: +# - id: flake8 + +# - repo: https://github.com/pre-commit/mirrors-mypy +# rev: v0.790 +# hooks: +# - id: mypy diff --git a/requirements.txt b/requirements.txt index eac912c..1c800b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,10 +17,9 @@ wandb>=0.10.20 # tensorboard # --------- linters --------- # -# black>=20.8b1 -# flake8>=3.8.4 -# pylint>=2.7.1 -# isort>=5.7.0 +pre-commit +# isort +# black # --------- others --------- # rich>=9.12.3