From 1432c0eb46841e015c4dba5748554e045173bf2a Mon Sep 17 00:00:00 2001 From: Jon Stroop Date: Sat, 1 Mar 2025 23:19:39 -0500 Subject: [PATCH 1/2] isort to ci --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++++- README.md | 1 + 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8907b76..35ffb57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,4 +68,31 @@ jobs: - name: Verify type hints run: | - pdm run mypy \ No newline at end of file + pdm run mypy + + isort: + name: isort + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python 3.13 + uses: actions/setup-python@v4 + with: + python-version: "3.13" + + - name: Install PDM + run: | + python -m pip install --upgrade pip + pip install pdm + + - name: Install dependencies + run: | + pdm install -G:all + + - name: Check import formatting + run: | + pdm run isort --check --verbose \ No newline at end of file diff --git a/README.md b/README.md index e2cb833..76e2ec7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![codecov](https://codecov.io/gh/jpstroop/fitbit-client-python/graph/badge.svg?token=DM0JD8VKZ4)](https://codecov.io/gh/jpstroop/fitbit-client-python) [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/) [![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/release/python-3130/) [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) From 08c75738084fb46214f44f4d6015604193565bea Mon Sep 17 00:00:00 2001 From: Jon Stroop Date: Sat, 1 Mar 2025 23:25:47 -0500 Subject: [PATCH 2/2] add black to CI --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35ffb57..21e94bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,4 +95,31 @@ jobs: - name: Check import formatting run: | - pdm run isort --check --verbose \ No newline at end of file + pdm run isort --check --verbose + + black: + name: black + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python 3.13 + uses: actions/setup-python@v4 + with: + python-version: "3.13" + + - name: Install PDM + run: | + python -m pip install --upgrade pip + pip install pdm + + - name: Install dependencies + run: | + pdm install -G:all + + - name: Check code style + run: | + pdm run black --check --verbose \ No newline at end of file