Various type hint related improvements (#54971)
* Avoid some implicit generic Anys * Fix hassio discovery view type hints * Fix http view result type in assert message
This commit is contained in:
parent
de354f96fe
commit
59809503d1
7 changed files with 22 additions and 16 deletions
|
@ -4,7 +4,9 @@ from __future__ import annotations
|
|||
import re
|
||||
from typing import Final
|
||||
|
||||
LEASES_REGEX: Final[re.Pattern] = re.compile(
|
||||
# mypy: disallow-any-generics
|
||||
|
||||
LEASES_REGEX: Final[re.Pattern[str]] = re.compile(
|
||||
r"(?P<ip>([0-9]{1,3}[\.]){3}[0-9]{1,3})"
|
||||
+ r"\smac:\s(?P<mac>([0-9a-f]{2}[:-]){5}([0-9a-f]{2}))"
|
||||
+ r"\svalid\sfor:\s(?P<timevalid>(-?\d+))"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue