From 4d062bb7e4a2c123ab5dfe93dc7df202def1adbb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 18:39:18 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.12.0 → 25.1.0](https://github.com/psf/black/compare/22.12.0...25.1.0) - [github.com/codespell-project/codespell: v2.2.2 → v2.4.1](https://github.com/codespell-project/codespell/compare/v2.2.2...v2.4.1) - [github.com/pycqa/flake8: 5.0.4 → 7.3.0](https://github.com/pycqa/flake8/compare/5.0.4...7.3.0) - [github.com/PyCQA/bandit: 1.7.4 → 1.8.6](https://github.com/PyCQA/bandit/compare/1.7.4...1.8.6) - https://github.com/pre-commit/mirrors-isort → https://github.com/PyCQA/isort - [github.com/PyCQA/isort: v5.9.3 → 6.0.1](https://github.com/PyCQA/isort/compare/v5.9.3...6.0.1) - [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v6.0.0) - [github.com/adrienverge/yamllint.git: v1.28.0 → v1.37.1](https://github.com/adrienverge/yamllint.git/compare/v1.28.0...v1.37.1) - [github.com/pre-commit/mirrors-mypy: v0.991 → v1.17.1](https://github.com/pre-commit/mirrors-mypy/compare/v0.991...v1.17.1) --- .pre-commit-config.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e58494d..d52f267 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 25.1.0 hooks: - id: black args: @@ -8,7 +8,7 @@ repos: - --quiet files: ^((custom_components|tests)/.+)?[^/]+\.py$ - repo: https://github.com/codespell-project/codespell - rev: v2.2.2 + rev: v2.4.1 hooks: - id: codespell args: @@ -17,7 +17,7 @@ repos: - --quiet-level=2 exclude_types: [csv, json] - repo: https://github.com/pycqa/flake8 - rev: 5.0.4 + rev: 7.3.0 hooks: - id: flake8 additional_dependencies: @@ -25,7 +25,7 @@ repos: - pydocstyle==6.1.1 files: ^(custom_components|tests)/.+\.py$ - repo: https://github.com/PyCQA/bandit - rev: 1.7.4 + rev: 1.8.6 hooks: - id: bandit args: @@ -33,18 +33,18 @@ repos: - --format=custom - --configfile=tests/bandit.yaml files: ^(custom_components|tests)/.+\.py$ - - repo: https://github.com/pre-commit/mirrors-isort - rev: v5.9.3 + - repo: https://github.com/PyCQA/isort + rev: 6.0.1 hooks: - id: isort - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v6.0.0 hooks: - id: check-executables-have-shebangs stages: [manual] - id: check-json - repo: https://github.com/adrienverge/yamllint.git - rev: v1.28.0 + rev: v1.37.1 hooks: - id: yamllint - repo: local @@ -56,7 +56,7 @@ repos: language: system files: ^(custom_components|tests)/.+\.py$ - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.991 + rev: v1.17.1 hooks: - id: mypy name: mypy From ab3fcd3da1fdff37a43171a569e73eae42dbf2bf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 18:40:59 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- custom_components/pyscript/config_flow.py | 1 + custom_components/pyscript/entity.py | 1 + custom_components/pyscript/logbook.py | 1 + custom_components/pyscript/requirements.py | 9 ++++++--- tests/test_init.py | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/custom_components/pyscript/config_flow.py b/custom_components/pyscript/config_flow.py index 0cfcab6..1b8bc75 100644 --- a/custom_components/pyscript/config_flow.py +++ b/custom_components/pyscript/config_flow.py @@ -1,4 +1,5 @@ """Config flow for pyscript.""" + import json from typing import Any, Dict diff --git a/custom_components/pyscript/entity.py b/custom_components/pyscript/entity.py index 8150392..02bfc5b 100644 --- a/custom_components/pyscript/entity.py +++ b/custom_components/pyscript/entity.py @@ -1,4 +1,5 @@ """Entity Classes.""" + from homeassistant.const import STATE_UNKNOWN from homeassistant.helpers.restore_state import RestoreEntity from homeassistant.helpers.typing import StateType diff --git a/custom_components/pyscript/logbook.py b/custom_components/pyscript/logbook.py index f09c846..7d2ae99 100644 --- a/custom_components/pyscript/logbook.py +++ b/custom_components/pyscript/logbook.py @@ -1,4 +1,5 @@ """Describe logbook events.""" + import logging from homeassistant.core import callback diff --git a/custom_components/pyscript/requirements.py b/custom_components/pyscript/requirements.py index 1f6377d..7df00e5 100644 --- a/custom_components/pyscript/requirements.py +++ b/custom_components/pyscript/requirements.py @@ -1,4 +1,5 @@ """Requirements helpers for pyscript.""" + import glob import logging import os @@ -298,9 +299,11 @@ async def install_requirements(hass, config_entry, pyscript_folder): hass, DOMAIN, [ - f"{package}=={pkg_info[ATTR_VERSION]}" - if pkg_info[ATTR_VERSION] != UNPINNED_VERSION - else package + ( + f"{package}=={pkg_info[ATTR_VERSION]}" + if pkg_info[ATTR_VERSION] != UNPINNED_VERSION + else package + ) for package, pkg_info in requirements_to_install.items() ], ) diff --git a/tests/test_init.py b/tests/test_init.py index 34526c2..0e7e282 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -1,4 +1,5 @@ """Test the pyscript component.""" + from ast import literal_eval import asyncio from datetime import datetime as dt