Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 25.1.0
hooks:
- id: black
args:
- --safe
- --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:
Expand All @@ -17,34 +17,34 @@ 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:
- flake8-docstrings==1.6.0
- 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:
- --quiet
- --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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions custom_components/pyscript/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config flow for pyscript."""

import json
from typing import Any, Dict

Expand Down
1 change: 1 addition & 0 deletions custom_components/pyscript/entity.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions custom_components/pyscript/logbook.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Describe logbook events."""

import logging

from homeassistant.core import callback
Expand Down
9 changes: 6 additions & 3 deletions custom_components/pyscript/requirements.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Requirements helpers for pyscript."""

import glob
import logging
import os
Expand Down Expand Up @@ -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()
],
)
Expand Down
1 change: 1 addition & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the pyscript component."""

from ast import literal_eval
import asyncio
from datetime import datetime as dt
Expand Down
Loading