Add empty line after module docstring [helpers + other] (#112707)
This commit is contained in:
parent
c773d57d39
commit
19ab3d6daf
284 changed files with 287 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
"""Start Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Provide an authentication layer for Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Storage for auth models."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Constants for the auth module."""
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
ACCESS_TOKEN_EXPIRATION = timedelta(minutes=30)
|
||||
|
|
|
@ -4,6 +4,7 @@ Since we decode the same tokens over and over again
|
|||
we can cache the result of the decode of valid tokens
|
||||
to speed up the process.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Pluggable auth modules for Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Example auth module."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
Sending HOTP through notify service
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Time-based One Time Password auth module."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Auth models."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Permissions for Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Entity permissions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import OrderedDict
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Permission for events."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Final
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Merging of policies."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import cast
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Models for permissions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""System policies."""
|
||||
|
||||
from .const import CAT_ENTITIES, POLICY_READ, SUBCAT_ALL
|
||||
|
||||
ADMIN_POLICY = {CAT_ENTITIES: True}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Common code for permissions."""
|
||||
|
||||
from collections.abc import Mapping
|
||||
|
||||
# MyPy doesn't support recursion yet. So writing it out as far as we need.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers to deal with permissions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Auth providers for Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Auth provider that validates credentials via an external command."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Home Assistant auth provider."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Example auth provider."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
It will be removed when auth system production ready
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
It shows list of users if access from trusted network.
|
||||
Abort login flow if not access from trusted network.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
|
|
|
@ -6,6 +6,7 @@ Since we have dropped support for Python 3.10, we can remove this backport.
|
|||
This file is kept for now to avoid breaking custom components that might
|
||||
import it.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from enum import StrEnum
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Block blocking calls being done in asyncio."""
|
||||
|
||||
from http.client import HTTPConnection
|
||||
import time
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Provide methods to bootstrap a Home Assistant instance."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -6,6 +6,7 @@ Component design guidelines:
|
|||
format "<DOMAIN>.<OBJECT_ID>".
|
||||
- Each component should publish services only under its own domain.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Module to help with parsing and generating configuration files."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import OrderedDict
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Manage config entries in Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Constants used by Home Assistant components."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from enum import StrEnum
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
Home Assistant is a Home Automation framework for observing the state
|
||||
of entities and react to changes.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Classes to help gather user submissions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import abc
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""The exceptions used by Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Generator, Sequence
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper methods for components within Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable, Sequence
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper for aiohttp webclient stuff."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Provide a way to connect devices to one physical location."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper to check the configuration file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import OrderedDict
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper to deal with YAML + storage."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Offer reusable conditions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers for data entry flows for config entries."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Awaitable, Callable
|
||||
|
|
|
@ -5,6 +5,7 @@ This module exists of the following parts:
|
|||
- OAuth2 implementation that works with local provided client ID/secret
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, ABCMeta, abstractmethod
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers for config validation using voluptuous."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Hashable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers for the data entry flow."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from http import HTTPStatus
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Debounce helper."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Deprecation helpers for Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Provide a way to connect entities belonging to one device."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import UserDict
|
||||
|
|
|
@ -5,6 +5,7 @@ There are two different types of discoveries that can be fired/listened for.
|
|||
- listen_platform/discover_platform is for platforms. These are used by
|
||||
components to allow discovery of their platforms.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Coroutine
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""The discovery flow helper."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Coroutine
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers for Home Assistant dispatcher & internal component/platform."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Coroutine
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""An abstract class for entities."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABCMeta
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers for components that manage entities."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Class to manage the entities for a single platform."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -7,6 +7,7 @@ The Entity Registry will persist itself 10 seconds after a new entity is
|
|||
registered. Registering a new entity while a timer is in progress resets the
|
||||
timer.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import UserDict
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""A class to hold entity values."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import OrderedDict
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper class to implement include/exclude of entities and domains."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers for listening to events."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Provide a way to assign areas to floors in one's home."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Provide frame helper for finding the current frame context."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper for groups."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper to track the current http request."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper for httpx."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Icon helper methods."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper to create a unique instance ID."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers to help with integration platforms."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Persistently store issues raised by integrations."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import dataclasses
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers to help with encoding Home Assistant objects in JSON."""
|
||||
|
||||
from collections import deque
|
||||
from collections.abc import Callable
|
||||
import datetime
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Provide a way to label and group anything."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Location helpers for Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Network helpers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Provide a base class for registries that use a normalized name index."""
|
||||
|
||||
from collections import UserDict
|
||||
from collections.abc import ValuesView
|
||||
from dataclasses import dataclass
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Ratelimit helper."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers to redact sensitive data."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Provide a base implementation for registries."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Class to reload platforms."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Support for restoring entity states on startup."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers for creating schema based data entry flows."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers to execute scripts."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Script variables."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Selectors for Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Mapping, Sequence
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Common functions related to sensor device management."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Service calling related helpers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""MQTT Discovery data."""
|
||||
|
||||
from dataclasses import dataclass
|
||||
import datetime as dt
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ The following cases will never be passed to your function:
|
|||
- if either state is unknown/unavailable
|
||||
- state adding/removing
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper to help coordinating calls."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers to help during startup."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Coroutine
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers that help with state related things."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper to help store data."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers for sun events."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helper to gather system info."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from functools import cache
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Temperature helpers for Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from numbers import Number
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Template helper methods for rendering strings with Home Assistant data."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ast import literal_eval
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers for script and condition tracing."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import deque
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Translation string lookup helpers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Triggers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""TemplateEntity utility class."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Typing Helpers for Home Assistant."""
|
||||
|
||||
from collections.abc import Mapping
|
||||
from enum import Enum
|
||||
from typing import Any, TypeVar
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Helpers to help coordinate updates."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import abstractmethod
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
This module has quite some complex parts. I have tried to add as much
|
||||
documentation as possible to keep it understandable.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Module to handle installing requirements."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue