From 9c453895e072ee7df12449ac287c66658c18636a Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Thu, 6 Apr 2023 17:58:46 +0200 Subject: [PATCH] Add .pre-commits --- .pre-commit-config.yml | 77 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .pre-commit-config.yml diff --git a/.pre-commit-config.yml b/.pre-commit-config.yml new file mode 100644 index 0000000..ec4a8d2 --- /dev/null +++ b/.pre-commit-config.yml @@ -0,0 +1,77 @@ +default_language_version: + python: python3.11 + +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: end-of-file-fixer + exclude: (.txt$|.ipynb$) + - id: trailing-whitespace + exclude: (.txt$|README.md$) + - id: check-yaml + - id: check-json + - id: check-toml + - id: check-xml + - id: check-ast + - id: check-added-large-files + args: [--enforce-all] + - id: name-tests-test + - id: detect-private-key + - id: check-case-conflict + - id: check-symlinks + - id: check-docstring-first + +- repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black + args: [--config=pyproject.toml] + # - id: black-jupyter + # args: [--config=pyproject.toml] + + +- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.4.0 + hooks: + - id: pretty-format-ini + args: [--autofix] + - id: pretty-format-yaml + args: [--autofix] + +- repo: https://github.com/domdfcoding/flake2lint + rev: v0.4.2 + hooks: + - id: flake2lint + +- repo: https://github.com/PyCQA/flake8 + rev: 5.0.4 + hooks: + - id: flake8 + args: [--config=tox.ini] + +- repo: https://github.com/pre-commit/mirrors-mypy + rev: v0.991 + hooks: + - id: mypy + +- repo: https://github.com/frnmst/md-toc + rev: 8.1.5 + hooks: + - id: md-toc + +- repo: https://gitlab.com/smop/pre-commit-hooks + rev: v1.0.0 + hooks: + - id: check-poetry + +- repo: https://github.com/Lucas-C/pre-commit-hooks-java + rev: 1.3.10 + hooks: [] + # - id: validate-html + +- repo: https://github.com/asottile/pyupgrade + rev: v3.2.2 + hooks: + - id: pyupgrade + args: [--py311-plus]