From cb2922baaef5e49949c754a369d8531c246b04d5 Mon Sep 17 00:00:00 2001 From: Lorenzo Monaco Date: Fri, 3 May 2024 09:11:30 +0000 Subject: [PATCH] Fix linting problems. --- .github/workflows/linting.yml | 1 - .github/workflows/tests.yml | 6 +++--- pyproject.toml | 2 +- requirements-dev.txt | 2 +- tests/__init__.py | 1 - tests/test_binary_sensor.py | 1 + tests/test_config_flow.py | 1 + tests/test_sensor.py | 1 + 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index b36956e..d4af180 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -17,7 +17,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements-dev.txt - - name: isort run: isort --recursive --diff . - name: Black diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 57ea333..43d3571 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,14 +7,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11"] + python-version: ["3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/pyproject.toml b/pyproject.toml index 4d51549..4eec8a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,2 @@ [tool.black] -target-version = ["py310", "py311"] +target-version = ["py310", "py311", "py312"] diff --git a/requirements-dev.txt b/requirements-dev.txt index a929552..2fc9700 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -black +black==22.1.0 isort pytest-homeassistant-custom-component~=0.13.54 pytest diff --git a/tests/__init__.py b/tests/__init__.py index 8d46587..aaf043a 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,6 +1,5 @@ """Initialize tests.""" - from custom_components.delios.client import DeliosClient diff --git a/tests/test_binary_sensor.py b/tests/test_binary_sensor.py index ca99a6d..b6d1538 100644 --- a/tests/test_binary_sensor.py +++ b/tests/test_binary_sensor.py @@ -1,4 +1,5 @@ """Tests for the binary sensor entity.""" + from unittest.mock import Mock import pytest diff --git a/tests/test_config_flow.py b/tests/test_config_flow.py index 73a014d..0b96ff9 100644 --- a/tests/test_config_flow.py +++ b/tests/test_config_flow.py @@ -1,4 +1,5 @@ """Tests for the config flow.""" + from unittest.mock import ANY, patch import pytest diff --git a/tests/test_sensor.py b/tests/test_sensor.py index b9637d7..6d7162c 100644 --- a/tests/test_sensor.py +++ b/tests/test_sensor.py @@ -1,4 +1,5 @@ """Tests for the sensor entity.""" + from unittest.mock import Mock import pytest