From 913bc525f6d920cc4abce3c715281cf08c0f1cae Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Tue, 24 Jun 2025 13:44:23 +0100 Subject: [PATCH] Change indentation --- .github/workflows/publish-pypi-package.yml | 36 +++---- .github/workflows/pull-request.yml | 106 ++++++++++----------- .pre-commit-config.yaml | 69 +++++++------- .prettierrc.json | 26 ++--- 4 files changed, 118 insertions(+), 119 deletions(-) diff --git a/.github/workflows/publish-pypi-package.yml b/.github/workflows/publish-pypi-package.yml index 039bb39f..778b4c9e 100644 --- a/.github/workflows/publish-pypi-package.yml +++ b/.github/workflows/publish-pypi-package.yml @@ -1,26 +1,26 @@ name: Publish Pypi Package on: - push: - tags: - - '*' + push: + tags: + - '*' jobs: - package: - runs-on: ubuntu-latest - name: Publish Pypi Package + package: + runs-on: ubuntu-latest + name: Publish Pypi Package - steps: - - name: Cloning repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 + steps: + - name: Cloning repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 - - name: Build binary wheel and a source tarball - run: python setup.py sdist + - name: Build binary wheel and a source tarball + run: python setup.py sdist - - name: Publish Package to Pypi - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + - name: Publish Package to Pypi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8cb5274f..ee179f7f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,58 +1,58 @@ name: Flag Engine Pull Request on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - branches: - - main - - release** + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + branches: + - main + - release** jobs: - test: - runs-on: ubuntu-latest - name: Flag engine Unit tests - - strategy: - max-parallel: 4 - matrix: - python-version: ['3.8', '3.9', '3.10'] - - steps: - - name: Cloning repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 - submodules: recursive - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt -r requirements-dev.txt - - - name: Check Formatting - run: black --check . - - - name: Check Imports - run: | - git ls-files | grep '\.py$' | xargs absolufy-imports - isort . --check - - - name: Check flake8 linting - run: flake8 . - - - name: Check Typing - run: mypy --strict . - - - name: Run Tests - run: pytest -p no:warnings - - - name: Check Coverage - uses: 5monkeys/cobertura-action@v14 - with: - minimum_coverage: 100 - fail_below_threshold: true + test: + runs-on: ubuntu-latest + name: Flag engine Unit tests + + strategy: + max-parallel: 4 + matrix: + python-version: ['3.8', '3.9', '3.10'] + + steps: + - name: Cloning repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt -r requirements-dev.txt + + - name: Check Formatting + run: black --check . + + - name: Check Imports + run: | + git ls-files | grep '\.py$' | xargs absolufy-imports + isort . --check + + - name: Check flake8 linting + run: flake8 . + + - name: Check Typing + run: mypy --strict . + + - name: Run Tests + run: pytest -p no:warnings + + - name: Check Coverage + uses: 5monkeys/cobertura-action@v14 + with: + minimum_coverage: 100 + fail_below_threshold: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9d9cc7cb..cb5f2d81 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,36 +1,35 @@ repos: - - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 - hooks: - - id: mypy - args: [--strict] - additional_dependencies: - [pydantic, pytest, pytest_mock, types-pytest-lazy-fixture, types-setuptools, semver] - - repo: https://github.com/MarcoGorelli/absolufy-imports - rev: v0.3.1 - hooks: - - id: absolufy-imports - - repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: - - id: isort - name: isort (python) - - repo: https://github.com/psf/black - rev: 24.3.0 - hooks: - - id: black - language_version: python3 - exclude: migrations - - repo: https://github.com/pycqa/flake8 - rev: 6.1.0 - hooks: - - id: flake8 - name: flake8 - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: check-yaml - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.7.1 - hooks: - - id: prettier + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.5.1 + hooks: + - id: mypy + args: [--strict] + additional_dependencies: [pydantic, pytest, pytest_mock, types-pytest-lazy-fixture, types-setuptools, semver] + - repo: https://github.com/MarcoGorelli/absolufy-imports + rev: v0.3.1 + hooks: + - id: absolufy-imports + - repo: https://github.com/PyCQA/isort + rev: 5.12.0 + hooks: + - id: isort + name: isort (python) + - repo: https://github.com/psf/black + rev: 24.3.0 + hooks: + - id: black + language_version: python3 + exclude: migrations + - repo: https://github.com/pycqa/flake8 + rev: 6.1.0 + hooks: + - id: flake8 + name: flake8 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-yaml + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v2.7.1 + hooks: + - id: prettier diff --git a/.prettierrc.json b/.prettierrc.json index acd83d5a..b5082f85 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,15 +1,15 @@ { - "proseWrap": "always", - "singleQuote": true, - "printWidth": 120, - "trailingComma": "all", - "tabWidth": 4, - "overrides": [ - { - "files": "*.md", - "options": { - "tabWidth": 1 - } - } - ] + "proseWrap": "always", + "singleQuote": true, + "printWidth": 120, + "trailingComma": "all", + "tabWidth": 2, + "overrides": [ + { + "files": "*.md", + "options": { + "tabWidth": 1 + } + } + ] }