mirror of
https://github.com/home-assistant/core.git
synced 2025-04-29 03:37:51 +00:00
Remove some unused TypeVars (#63346)
This commit is contained in:
parent
4d59c1bf07
commit
3e51659ba7
@ -5,7 +5,7 @@ import asyncio
|
|||||||
import copy
|
import copy
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Final, Literal, TypeVar, cast
|
from typing import Any, Final, Literal, cast
|
||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
ATTR_LAST_RESET,
|
ATTR_LAST_RESET,
|
||||||
@ -59,9 +59,6 @@ async def async_setup_platform(
|
|||||||
await sensor_manager.async_start()
|
await sensor_manager.async_start()
|
||||||
|
|
||||||
|
|
||||||
T = TypeVar("T")
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class SourceAdapter:
|
class SourceAdapter:
|
||||||
"""Adapter to allow sources and their flows to be used as sensors."""
|
"""Adapter to allow sources and their flows to be used as sensors."""
|
||||||
|
@ -4,7 +4,6 @@ from __future__ import annotations
|
|||||||
import asyncio
|
import asyncio
|
||||||
from collections.abc import Callable, Coroutine, Iterable, KeysView
|
from collections.abc import Callable, Coroutine, Iterable, KeysView
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import enum
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
@ -19,7 +18,6 @@ from .dt import as_local, utcnow
|
|||||||
|
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
U = TypeVar("U") # pylint: disable=invalid-name
|
U = TypeVar("U") # pylint: disable=invalid-name
|
||||||
ENUM_T = TypeVar("ENUM_T", bound=enum.Enum) # pylint: disable=invalid-name
|
|
||||||
|
|
||||||
RE_SANITIZE_FILENAME = re.compile(r"(~|\.\.|/|\\)")
|
RE_SANITIZE_FILENAME = re.compile(r"(~|\.\.|/|\\)")
|
||||||
RE_SANITIZE_PATH = re.compile(r"(~|\.(\.)+)")
|
RE_SANITIZE_PATH = re.compile(r"(~|\.(\.)+)")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user