From 3c7960a2cc3e9ce7d558d6aa8b038fb06f3de6e1 Mon Sep 17 00:00:00 2001 From: ElNiak Date: Thu, 13 Jun 2024 16:56:29 +0200 Subject: [PATCH] update aciton --- .github/workflows/pre-commit.yml | 14 ++++++++++++++ .pre-commit-config.yaml | 22 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..21a735a --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,14 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [master] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.1 \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..46b5f2c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,22 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black + language_version: python3 + skip-string-normalization: true +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + # - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - id: check-ast + - id: check-json + - id: check-merge-conflict + - id: check-toml + # - id: pretty-format-json + args: ["--autofix", "--no-sort-keys"] \ No newline at end of file