Remove some unused TypeVars (#63346)

This commit is contained in:
Marc Mueller 2022-01-04 15:38:34 +01:00 committed by GitHub
parent 4d59c1bf07
commit 3e51659ba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View File

@ -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."""

View File

@ -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"(~|\.(\.)+)")