From a14cbf93818d024fe53b96e4c448555096847eb7 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 25 Mar 2022 20:28:16 +0200 Subject: [PATCH] Add missing file --- .gitignore | 1 + .pre-commit-config.yaml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.gitignore b/.gitignore index d475bc1..99c9d7d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ __pycache__ *.db /*.yaml !example-config.yaml +!.pre-commit-config.yaml logs/ plugins/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..43dc887 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,23 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.1.0 + hooks: + - id: trailing-whitespace + exclude_types: [markdown] + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + # TODO convert to use the upstream psf/black when + # https://github.com/psf/black/issues/2493 gets fixed + - repo: local + hooks: + - id: black + name: black + entry: black --check + language: system + files: ^maubot/.*\.py$ + - repo: https://github.com/PyCQA/isort + rev: 5.10.1 + hooks: + - id: isort + files: ^maubot/.*$