Skip to content

Commit

Permalink
chore: update for Python 3.13 (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jan 18, 2025
1 parent 4522dc8 commit 8361b69
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
python-version:
- "3.11"
- "3.12"
- "3.13"
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repos:
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py311-plus]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
from typing import Any, List
from typing import Any

# -- Project information -----------------------------------------------------

Expand All @@ -40,7 +40,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns: List[Any] = []
exclude_patterns: list[Any] = []


# -- Options for HTML output -------------------------------------------------
Expand Down
11 changes: 5 additions & 6 deletions src/bthome_ble/const.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Constants for BTHome measurements."""

import dataclasses
from typing import Union

from sensor_state_data import (
BaseDeviceClass,
Expand All @@ -16,11 +15,11 @@

@dataclasses.dataclass
class MeasTypes:
meas_format: Union[
EventDeviceKeys,
description.BaseBinarySensorDescription,
description.BaseSensorDescription,
]
meas_format: (
EventDeviceKeys
| description.BaseBinarySensorDescription
| description.BaseSensorDescription
)
data_length: int = 1
data_format: str = "unsigned_integer"
factor: float = 1
Expand Down

0 comments on commit 8361b69

Please sign in to comment.