From c5ffd078931c068cadd9f48c0f6853d268de419d Mon Sep 17 00:00:00 2001 From: blazickjp Date: Thu, 10 Apr 2025 19:51:09 -0700 Subject: [PATCH] Formatting checks --- .github/workflows/lint.yml | 27 +++++++++++++++++++++++++++ .pre-commit-config.yaml | 6 ++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b66e502 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,27 @@ +name: Lint + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + types: [opened, synchronize, reopened] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + pip install black + + - name: Check code formatting with Black + run: | + black --check . \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0f7c5c9 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: +- repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black + language_version: python3.11 \ No newline at end of file