Add empty line after module docstring [helpers + other] (#112707)

This commit is contained in:
Marc Mueller 2024-03-08 16:36:11 +01:00 committed by GitHub
parent c773d57d39
commit 19ab3d6daf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
284 changed files with 287 additions and 0 deletions

View File

@ -1,4 +1,5 @@
"""Start Home Assistant."""
from __future__ import annotations
import argparse

View File

@ -1,4 +1,5 @@
"""Provide an authentication layer for Home Assistant."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Storage for auth models."""
from __future__ import annotations
from datetime import timedelta

View File

@ -1,4 +1,5 @@
"""Constants for the auth module."""
from datetime import timedelta
ACCESS_TOKEN_EXPIRATION = timedelta(minutes=30)

View File

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

View File

@ -1,4 +1,5 @@
"""Pluggable auth modules for Home Assistant."""
from __future__ import annotations
import importlib

View File

@ -1,4 +1,5 @@
"""Example auth module."""
from __future__ import annotations
from typing import Any

View File

@ -2,6 +2,7 @@
Sending HOTP through notify service
"""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Time-based One Time Password auth module."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Auth models."""
from __future__ import annotations
from datetime import datetime, timedelta

View File

@ -1,4 +1,5 @@
"""Permissions for Home Assistant."""
from __future__ import annotations
from collections.abc import Callable

View File

@ -1,4 +1,5 @@
"""Entity permissions."""
from __future__ import annotations
from collections import OrderedDict

View File

@ -1,4 +1,5 @@
"""Permission for events."""
from __future__ import annotations
from typing import Final

View File

@ -1,4 +1,5 @@
"""Merging of policies."""
from __future__ import annotations
from typing import cast

View File

@ -1,4 +1,5 @@
"""Models for permissions."""
from __future__ import annotations
from typing import TYPE_CHECKING

View File

@ -1,4 +1,5 @@
"""System policies."""
from .const import CAT_ENTITIES, POLICY_READ, SUBCAT_ALL
ADMIN_POLICY = {CAT_ENTITIES: True}

View File

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

View File

@ -1,4 +1,5 @@
"""Helpers to deal with permissions."""
from __future__ import annotations
from collections.abc import Callable

View File

@ -1,4 +1,5 @@
"""Auth providers for Home Assistant."""
from __future__ import annotations
from collections.abc import Mapping

View File

@ -1,4 +1,5 @@
"""Auth provider that validates credentials via an external command."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Home Assistant auth provider."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Example auth provider."""
from __future__ import annotations
from collections.abc import Mapping

View File

@ -2,6 +2,7 @@
It will be removed when auth system production ready
"""
from __future__ import annotations
from collections.abc import Mapping

View File

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

View File

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

View File

@ -1,4 +1,5 @@
"""Block blocking calls being done in asyncio."""
from http.client import HTTPConnection
import time

View File

@ -1,4 +1,5 @@
"""Provide methods to bootstrap a Home Assistant instance."""
from __future__ import annotations
import asyncio

View File

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

View File

@ -1,4 +1,5 @@
"""Module to help with parsing and generating configuration files."""
from __future__ import annotations
from collections import OrderedDict

View File

@ -1,4 +1,5 @@
"""Manage config entries in Home Assistant."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Constants used by Home Assistant components."""
from __future__ import annotations
from enum import StrEnum

View File

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

View File

@ -1,4 +1,5 @@
"""Classes to help gather user submissions."""
from __future__ import annotations
import abc

View File

@ -1,4 +1,5 @@
"""The exceptions used by Home Assistant."""
from __future__ import annotations
from collections.abc import Generator, Sequence

View File

@ -1,4 +1,5 @@
"""Helper methods for components within Home Assistant."""
from __future__ import annotations
from collections.abc import Iterable, Sequence

View File

@ -1,4 +1,5 @@
"""Helper for aiohttp webclient stuff."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Provide a way to connect devices to one physical location."""
from __future__ import annotations
from collections.abc import Iterable

View File

@ -1,4 +1,5 @@
"""Helper to check the configuration file."""
from __future__ import annotations
from collections import OrderedDict

View File

@ -1,4 +1,5 @@
"""Helper to deal with YAML + storage."""
from __future__ import annotations
from abc import ABC, abstractmethod

View File

@ -1,4 +1,5 @@
"""Offer reusable conditions."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Helpers for data entry flows for config entries."""
from __future__ import annotations
from collections.abc import Awaitable, Callable

View File

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

View File

@ -1,4 +1,5 @@
"""Helpers for config validation using voluptuous."""
from __future__ import annotations
from collections.abc import Callable, Hashable

View File

@ -1,4 +1,5 @@
"""Helpers for the data entry flow."""
from __future__ import annotations
from http import HTTPStatus

View File

@ -1,4 +1,5 @@
"""Debounce helper."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Deprecation helpers for Home Assistant."""
from __future__ import annotations
from collections.abc import Callable

View File

@ -1,4 +1,5 @@
"""Provide a way to connect entities belonging to one device."""
from __future__ import annotations
from collections import UserDict

View File

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

View File

@ -1,4 +1,5 @@
"""The discovery flow helper."""
from __future__ import annotations
from collections.abc import Coroutine

View File

@ -1,4 +1,5 @@
"""Helpers for Home Assistant dispatcher & internal component/platform."""
from __future__ import annotations
from collections.abc import Callable, Coroutine

View File

@ -1,4 +1,5 @@
"""An abstract class for entities."""
from __future__ import annotations
from abc import ABCMeta

View File

@ -1,4 +1,5 @@
"""Helpers for components that manage entities."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Class to manage the entities for a single platform."""
from __future__ import annotations
import asyncio

View File

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

View File

@ -1,4 +1,5 @@
"""A class to hold entity values."""
from __future__ import annotations
from collections import OrderedDict

View File

@ -1,4 +1,5 @@
"""Helper class to implement include/exclude of entities and domains."""
from __future__ import annotations
from collections.abc import Callable

View File

@ -1,4 +1,5 @@
"""Helpers for listening to events."""
from __future__ import annotations
import asyncio

View File

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

View File

@ -1,4 +1,5 @@
"""Provide frame helper for finding the current frame context."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Helper for groups."""
from __future__ import annotations
from collections.abc import Iterable

View File

@ -1,4 +1,5 @@
"""Helper to track the current http request."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Helper for httpx."""
from __future__ import annotations
from collections.abc import Callable

View File

@ -1,4 +1,5 @@
"""Icon helper methods."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Helper to create a unique instance ID."""
from __future__ import annotations
import logging

View File

@ -1,4 +1,5 @@
"""Helpers to help with integration platforms."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Persistently store issues raised by integrations."""
from __future__ import annotations
import dataclasses

View File

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

View File

@ -1,4 +1,5 @@
"""Provide a way to label and group anything."""
from __future__ import annotations
from collections.abc import Iterable

View File

@ -1,4 +1,5 @@
"""Location helpers for Home Assistant."""
from __future__ import annotations
from collections.abc import Iterable

View File

@ -1,4 +1,5 @@
"""Network helpers."""
from __future__ import annotations
from collections.abc import Callable

View File

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

View File

@ -1,4 +1,5 @@
"""Ratelimit helper."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Helpers to redact sensitive data."""
from __future__ import annotations
from collections.abc import Callable, Iterable, Mapping

View File

@ -1,4 +1,5 @@
"""Provide a base implementation for registries."""
from __future__ import annotations
from abc import ABC, abstractmethod

View File

@ -1,4 +1,5 @@
"""Class to reload platforms."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Support for restoring entity states on startup."""
from __future__ import annotations
from abc import ABC, abstractmethod

View File

@ -1,4 +1,5 @@
"""Helpers for creating schema based data entry flows."""
from __future__ import annotations
from abc import ABC, abstractmethod

View File

@ -1,4 +1,5 @@
"""Helpers to execute scripts."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Script variables."""
from __future__ import annotations
from collections.abc import Mapping

View File

@ -1,4 +1,5 @@
"""Selectors for Home Assistant."""
from __future__ import annotations
from collections.abc import Callable, Mapping, Sequence

View File

@ -1,4 +1,5 @@
"""Common functions related to sensor device management."""
from __future__ import annotations
from typing import TYPE_CHECKING

View File

@ -1,4 +1,5 @@
"""Service calling related helpers."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""MQTT Discovery data."""
from dataclasses import dataclass
import datetime as dt

View File

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

View File

@ -1,4 +1,5 @@
"""Helper to help coordinating calls."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Helpers to help during startup."""
from __future__ import annotations
from collections.abc import Callable, Coroutine

View File

@ -1,4 +1,5 @@
"""Helpers that help with state related things."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Helper to help store data."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Helpers for sun events."""
from __future__ import annotations
from collections.abc import Callable

View File

@ -1,4 +1,5 @@
"""Helper to gather system info."""
from __future__ import annotations
from functools import cache

View File

@ -1,4 +1,5 @@
"""Temperature helpers for Home Assistant."""
from __future__ import annotations
from numbers import Number

View File

@ -1,4 +1,5 @@
"""Template helper methods for rendering strings with Home Assistant data."""
from __future__ import annotations
from ast import literal_eval

View File

@ -1,4 +1,5 @@
"""Helpers for script and condition tracing."""
from __future__ import annotations
from collections import deque

View File

@ -1,4 +1,5 @@
"""Translation string lookup helpers."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""Triggers."""
from __future__ import annotations
import asyncio

View File

@ -1,4 +1,5 @@
"""TemplateEntity utility class."""
from __future__ import annotations
import contextlib

View File

@ -1,4 +1,5 @@
"""Typing Helpers for Home Assistant."""
from collections.abc import Mapping
from enum import Enum
from typing import Any, TypeVar

View File

@ -1,4 +1,5 @@
"""Helpers to help coordinate updates."""
from __future__ import annotations
from abc import abstractmethod

View File

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

View File

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