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