diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b99538..6fcadca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,12 +9,12 @@ ci: repos: - repo: https://github.com/commitizen-tools/commitizen - rev: v3.2.2 + rev: v3.27.0 hooks: - id: commitizen stages: [commit-msg] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: debug-statements - id: check-builtin-literals @@ -33,7 +33,7 @@ repos: # hooks: # - id: prettier - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.16.0 hooks: - id: pyupgrade args: [--py37-plus] @@ -42,23 +42,23 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.12.1 + rev: 24.4.2 hooks: - id: black - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.1.0 hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.10.1 hooks: - id: mypy - repo: https://github.com/PyCQA/bandit - rev: 1.7.6 + rev: 1.7.9 hooks: - id: bandit args: [-x, tests] diff --git a/src/bthome_ble/__init__.py b/src/bthome_ble/__init__.py index 5b9becb..223ac87 100644 --- a/src/bthome_ble/__init__.py +++ b/src/bthome_ble/__init__.py @@ -1,4 +1,5 @@ """Parser for BLE advertisements in BTHome format.""" + from __future__ import annotations from sensor_state_data import ( diff --git a/src/bthome_ble/bthome_v1_encryption.py b/src/bthome_ble/bthome_v1_encryption.py index 12a7391..c4e51c7 100644 --- a/src/bthome_ble/bthome_v1_encryption.py +++ b/src/bthome_ble/bthome_v1_encryption.py @@ -1,4 +1,5 @@ """Example showing encoding and decoding of BTHome v1 advertisement""" + from __future__ import annotations import binascii diff --git a/src/bthome_ble/bthome_v2_encryption.py b/src/bthome_ble/bthome_v2_encryption.py index 47ad1e4..e2d432e 100644 --- a/src/bthome_ble/bthome_v2_encryption.py +++ b/src/bthome_ble/bthome_v2_encryption.py @@ -1,4 +1,5 @@ """Example showing encoding and decoding of BTHome v2 advertisement""" + from __future__ import annotations import binascii diff --git a/src/bthome_ble/const.py b/src/bthome_ble/const.py index 4803993..05ea0f0 100644 --- a/src/bthome_ble/const.py +++ b/src/bthome_ble/const.py @@ -1,4 +1,5 @@ """Constants for BTHome measurements.""" + import dataclasses from typing import Union diff --git a/src/bthome_ble/event.py b/src/bthome_ble/event.py index 6c2cc6a..94ddc5c 100644 --- a/src/bthome_ble/event.py +++ b/src/bthome_ble/event.py @@ -1,4 +1,5 @@ """Event constants for BTHome measurements.""" + from __future__ import annotations from sensor_state_data.enum import StrEnum diff --git a/src/bthome_ble/parser.py b/src/bthome_ble/parser.py index d152ee7..33c7650 100644 --- a/src/bthome_ble/parser.py +++ b/src/bthome_ble/parser.py @@ -8,6 +8,7 @@ MIT License applies. """ + from __future__ import annotations import logging diff --git a/tests/test_parser_v1.py b/tests/test_parser_v1.py index bb03d80..991831b 100644 --- a/tests/test_parser_v1.py +++ b/tests/test_parser_v1.py @@ -1,4 +1,5 @@ """Tests for the parser of BLE advertisements in BTHome V1 format.""" + import logging from datetime import datetime, timezone from unittest.mock import patch diff --git a/tests/test_parser_v2.py b/tests/test_parser_v2.py index 3ff8bc3..7aac8b5 100644 --- a/tests/test_parser_v2.py +++ b/tests/test_parser_v2.py @@ -1,4 +1,5 @@ """Tests for the parser of BLE advertisements in BTHome V2 format.""" + import logging from datetime import datetime, timezone from unittest.mock import patch diff --git a/tests/test_v1_encryption.py b/tests/test_v1_encryption.py index 3c932a1..d419fd7 100644 --- a/tests/test_v1_encryption.py +++ b/tests/test_v1_encryption.py @@ -1,4 +1,5 @@ """Tests for the parser of BLE advertisements in BTHome V1 format.""" + import binascii from bthome_ble.bthome_v1_encryption import decrypt_aes_ccm, encrypt_payload diff --git a/tests/test_v2_encryption.py b/tests/test_v2_encryption.py index b6e9441..36d3910 100644 --- a/tests/test_v2_encryption.py +++ b/tests/test_v2_encryption.py @@ -1,4 +1,5 @@ """Tests for the parser of BLE advertisements in BTHome V2 format.""" + import binascii from bthome_ble.bthome_v2_encryption import decrypt_aes_ccm, encrypt_payload