From 75c07fab09ccaba21d6276c235e9c1f39a49d33c Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Thu, 5 Dec 2024 08:39:31 -0800 Subject: [PATCH] Added additional formatters to CI --- .github/workflows/formatting.yaml | 13 +++++++++++++ .../test_data/private/metadata_generator.py | 5 ++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml index 2b20b6563f..068caed7bf 100644 --- a/.github/workflows/formatting.yaml +++ b/.github/workflows/formatting.yaml @@ -29,3 +29,16 @@ jobs: if [[ -n "$(git status --porcelain)" ]]; then exit 1 fi + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.11 + - name: Install dependencies + run: | + pip install 'black==24.10.0' 'isort==5.13.2' + - name: Run black + run: | + python -m black --check --diff ./ + - name: Run isort + run: | + python -m isort --profile=black --check-only ./ diff --git a/crate_universe/test_data/private/metadata_generator.py b/crate_universe/test_data/private/metadata_generator.py index d63e7dea11..f04d8103a2 100755 --- a/crate_universe/test_data/private/metadata_generator.py +++ b/crate_universe/test_data/private/metadata_generator.py @@ -1,14 +1,13 @@ #!/usr/bin/env python3 -from pathlib import Path -from typing import List import json import os import shutil -import shutil import subprocess import sys import tempfile +from pathlib import Path +from typing import List def run_subprocess(command: List[str]) -> subprocess.CompletedProcess[str]: