diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 36e8417..899330d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,8 +26,9 @@ jobs: python-version: "3.14" - name: Install Ruff - # Same floor as requirements_dev.txt. - run: pip install "ruff>=0.16.3" + # Pinned, same as requirements_dev.txt. A new Ruff release can add or + # change rules, so bump it on purpose in its own PR. + run: pip install "ruff==0.17.0" - name: Ruff check run: ruff check . diff --git a/custom_components/gree_custom/const.py b/custom_components/gree_custom/const.py index f4cb6e2..7e3c089 100755 --- a/custom_components/gree_custom/const.py +++ b/custom_components/gree_custom/const.py @@ -1,8 +1,6 @@ """Constants for the Gree integration.""" -from homeassistant.components.climate import ( - HVACMode, # pyright: ignore[reportPrivateImportUsage] -) +from homeassistant.components.climate import HVACMode # pyright: ignore[reportPrivateImportUsage] from homeassistant.const import UnitOfTemperature from .aiogree.api import ( diff --git a/docs/development.md b/docs/development.md index 44438ba..44e9d36 100644 --- a/docs/development.md +++ b/docs/development.md @@ -184,6 +184,8 @@ Never log an encryption key, cloud password or token in clear text. `lint.yml` runs `ruff check` and `ruff format --check` on every push and PR. +Ruff is pinned to one exact version, in `lint.yml` and in `requirements_dev.txt`. Keep the two the same. New Ruff releases change rules: 0.16 and 0.17 want opposite forms of the same import, so no code passes both. Bump the pin in its own PR and run `ruff check --fix .` with the new version in that PR. + `validate.yaml` runs three jobs on every push and PR: - **Hassfest** and **HACS** validation. Neither imports or compiles the Python. diff --git a/requirements_dev.txt b/requirements_dev.txt index ef32dd2..823eed6 100755 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,5 +1,5 @@ # Linting / formatting (same tool HA core uses) -ruff>=0.16.3 +ruff==0.17.0 # Additional static analysis - HA core's CI also runs these pylint>=4.0.7