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 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