Remove support for python <3.11 (#1273)

Python 3.11 ships with latest Debian Bookworm. 
pypy is not that widely used with this library based on statistics. It could be added back when pypy supports python 3.11.
This commit is contained in:
Steven B.
2024-11-18 18:46:36 +00:00
committed by GitHub
parent 0c40939624
commit a01247d48f
55 changed files with 176 additions and 620 deletions

View File

@@ -4,7 +4,6 @@ from __future__ import annotations
import logging
from enum import Enum
from typing import Dict, List, Optional
from pydantic.v1 import BaseModel
@@ -35,20 +34,20 @@ class Rule(BaseModel):
id: str
name: str
enable: bool
wday: List[int] # noqa: UP006
wday: list[int]
repeat: bool
# start action
sact: Optional[Action] # noqa: UP007
sact: Action | None
stime_opt: TimeOption
smin: int
eact: Optional[Action] # noqa: UP007
eact: Action | None
etime_opt: TimeOption
emin: int
# Only on bulbs
s_light: Optional[Dict] # noqa: UP006,UP007
s_light: dict | None
_LOGGER = logging.getLogger(__name__)