Add empty line after module docstring (2) [other] (#112738)

This commit is contained in:
Marc Mueller 2024-03-08 19:16:38 +01:00 committed by GitHub
parent 32f3f46542
commit a6b842f818
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
75 changed files with 76 additions and 0 deletions

View file

@ -1,4 +1,5 @@
"""Signal handling related helpers.""" """Signal handling related helpers."""
import asyncio import asyncio
import logging import logging
import signal import signal

View file

@ -1,4 +1,5 @@
"""Script to manage users for the Home Assistant auth provider.""" """Script to manage users for the Home Assistant auth provider."""
import argparse import argparse
import asyncio import asyncio
import logging import logging

View file

@ -1,4 +1,5 @@
"""Script to ensure a configuration file exists.""" """Script to ensure a configuration file exists."""
import argparse import argparse
import asyncio import asyncio
import os import os

View file

@ -1,4 +1,5 @@
"""Script to install/uninstall HA into OS X.""" """Script to install/uninstall HA into OS X."""
import os import os
import time import time

View file

@ -1,4 +1,5 @@
"""Helper to create SSL contexts.""" """Helper to create SSL contexts."""
import contextlib import contextlib
from enum import StrEnum from enum import StrEnum
from functools import cache from functools import cache

View file

@ -1,4 +1,5 @@
"""Threading util helpers.""" """Threading util helpers."""
import ctypes import ctypes
import inspect import inspect
import logging import logging

View file

@ -1,4 +1,5 @@
"""Package metadata validation.""" """Package metadata validation."""
import tomllib import tomllib
from homeassistant.const import REQUIRED_PYTHON_VER, __version__ from homeassistant.const import REQUIRED_PYTHON_VER, __version__

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Inspect all component SCHEMAS.""" """Inspect all component SCHEMAS."""
import importlib import importlib
import os import os
import pkgutil import pkgutil

View file

@ -1,4 +1,5 @@
"""Helper script to update language list from the frontend source.""" """Helper script to update language list from the frontend source."""
import json import json
from pathlib import Path from pathlib import Path
import sys import sys

View file

@ -3,6 +3,7 @@
This is NOT a full CI/linting replacement, only a quick check during development. This is NOT a full CI/linting replacement, only a quick check during development.
""" """
import asyncio import asyncio
from collections import namedtuple from collections import namedtuple
from contextlib import suppress from contextlib import suppress

View file

@ -1,4 +1,5 @@
"""Validate manifests.""" """Validate manifests."""
import argparse import argparse
from pathlib import Path from pathlib import Path
import subprocess import subprocess

View file

@ -1,4 +1,5 @@
"""Gather info for scaffolding.""" """Gather info for scaffolding."""
import json import json
from homeassistant.util import slugify from homeassistant.util import slugify

View file

@ -1,4 +1,5 @@
"""Config flow for NEW_NAME.""" """Config flow for NEW_NAME."""
import my_pypi_dependency import my_pypi_dependency
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View file

@ -1,4 +1,5 @@
"""Test the NEW_NAME integration.""" """Test the NEW_NAME integration."""
import pytest import pytest
from homeassistant.components.NEW_DOMAIN.const import DOMAIN from homeassistant.components.NEW_DOMAIN.const import DOMAIN

View file

@ -1,4 +1,5 @@
"""Config flow for NEW_NAME.""" """Config flow for NEW_NAME."""
import logging import logging
from homeassistant.helpers import config_entry_oauth2_flow from homeassistant.helpers import config_entry_oauth2_flow

View file

@ -1,4 +1,5 @@
"""The tests for NEW_NAME device actions.""" """The tests for NEW_NAME device actions."""
import pytest import pytest
from pytest_unordered import unordered from pytest_unordered import unordered

View file

@ -1,4 +1,5 @@
"""The tests for NEW_NAME device triggers.""" """The tests for NEW_NAME device triggers."""
import pytest import pytest
from pytest_unordered import unordered from pytest_unordered import unordered

View file

@ -1,4 +1,5 @@
"""Test reproduce state for NEW_NAME.""" """Test reproduce state for NEW_NAME."""
import pytest import pytest
from homeassistant.core import HomeAssistant, State from homeassistant.core import HomeAssistant, State

View file

@ -1,4 +1,5 @@
"""Validate manifests.""" """Validate manifests."""
import argparse import argparse
import importlib import importlib
from pathlib import Path from pathlib import Path

View file

@ -1,4 +1,5 @@
"""Find translation keys that are in Lokalise but no longer defined in source.""" """Find translation keys that are in Lokalise but no longer defined in source."""
import argparse import argparse
from .const import CORE_PROJECT_ID, FRONTEND_DIR, FRONTEND_PROJECT_ID, INTEGRATIONS_DIR from .const import CORE_PROJECT_ID, FRONTEND_DIR, FRONTEND_PROJECT_ID, INTEGRATIONS_DIR

View file

@ -1,4 +1,5 @@
"""Translation constants.""" """Translation constants."""
import pathlib import pathlib
CORE_PROJECT_ID = "130246255a974bd3b5e8a1.51616605" CORE_PROJECT_ID = "130246255a974bd3b5e8a1.51616605"

View file

@ -1,4 +1,5 @@
"""Compile the current translation strings files for testing.""" """Compile the current translation strings files for testing."""
import argparse import argparse
import json import json
from pathlib import Path from pathlib import Path

View file

@ -1,4 +1,5 @@
"""Errors for translations.""" """Errors for translations."""
import json import json

View file

@ -1,4 +1,5 @@
"""Write updated translations to the frontend.""" """Write updated translations to the frontend."""
import argparse import argparse
import json import json

View file

@ -1,4 +1,5 @@
"""Migrate things.""" """Migrate things."""
import json import json
import pathlib import pathlib
from pprint import pprint from pprint import pprint

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Merge all translation sources into a single JSON file.""" """Merge all translation sources into a single JSON file."""
import json import json
import os import os
import pathlib import pathlib

View file

@ -1,4 +1,5 @@
"""Translation utils.""" """Translation utils."""
import argparse import argparse
import json import json
import os import os

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Helper script to bump the current version.""" """Helper script to bump the current version."""
import argparse import argparse
import re import re
import subprocess import subprocess

View file

@ -1,4 +1,5 @@
"""Test the HMAC-based One Time Password (MFA) auth module.""" """Test the HMAC-based One Time Password (MFA) auth module."""
import asyncio import asyncio
from unittest.mock import patch from unittest.mock import patch

View file

@ -1,4 +1,5 @@
"""Test the Time-based One Time Password (MFA) auth module.""" """Test the Time-based One Time Password (MFA) auth module."""
import asyncio import asyncio
from unittest.mock import patch from unittest.mock import patch

View file

@ -1,4 +1,5 @@
"""Tests for entity permissions.""" """Tests for entity permissions."""
import pytest import pytest
import voluptuous as vol import voluptuous as vol

View file

@ -1,4 +1,5 @@
"""Test the Home Assistant local auth provider.""" """Test the Home Assistant local auth provider."""
import asyncio import asyncio
from unittest.mock import Mock, patch from unittest.mock import Mock, patch

View file

@ -1,4 +1,5 @@
"""Tests for the legacy_api_password auth provider.""" """Tests for the legacy_api_password auth provider."""
import pytest import pytest
from homeassistant import auth, data_entry_flow from homeassistant import auth, data_entry_flow

View file

@ -1,4 +1,5 @@
"""Tests for the auth store.""" """Tests for the auth store."""
import asyncio import asyncio
from datetime import timedelta from datetime import timedelta
from typing import Any from typing import Any

View file

@ -1,4 +1,5 @@
"""Tests for hassfest dependency finder.""" """Tests for hassfest dependency finder."""
import ast import ast
import pytest import pytest
@ -59,6 +60,7 @@ def test_renamed_absolute(mock_collector) -> None:
mock_collector.visit( mock_collector.visit(
ast.parse( ast.parse(
""" """
import homeassistant.components.renamed_absolute as hue import homeassistant.components.renamed_absolute as hue
""" """
) )

View file

@ -1,4 +1,5 @@
"""Tests for hassfest version.""" """Tests for hassfest version."""
import pytest import pytest
import voluptuous as vol import voluptuous as vol

View file

@ -1,4 +1,5 @@
"""Test check_config helper.""" """Test check_config helper."""
import logging import logging
from unittest.mock import Mock, patch from unittest.mock import Mock, patch

View file

@ -1,4 +1,5 @@
"""Tests for debounce.""" """Tests for debounce."""
import asyncio import asyncio
from datetime import timedelta from datetime import timedelta
import logging import logging

View file

@ -1,4 +1,5 @@
"""Test the entity helper.""" """Test the entity helper."""
import asyncio import asyncio
from collections.abc import Iterable from collections.abc import Iterable
import dataclasses import dataclasses

View file

@ -1,4 +1,5 @@
"""Tests for the EntityPlatform helper.""" """Tests for the EntityPlatform helper."""
import asyncio import asyncio
from collections.abc import Iterable from collections.abc import Iterable
from datetime import timedelta from datetime import timedelta

View file

@ -1,4 +1,5 @@
"""Tests for the floor registry.""" """Tests for the floor registry."""
import re import re
from typing import Any from typing import Any

View file

@ -1,4 +1,5 @@
"""Test Home Assistant remote methods and classes.""" """Test Home Assistant remote methods and classes."""
import datetime import datetime
from functools import partial from functools import partial
import json import json

View file

@ -1,4 +1,5 @@
"""Tests for the Label Registry.""" """Tests for the Label Registry."""
import re import re
from typing import Any from typing import Any

View file

@ -1,4 +1,5 @@
"""Tests for the normalized name base registry helper.""" """Tests for the normalized name base registry helper."""
import pytest import pytest
from homeassistant.helpers.normalized_name_base_registry import ( from homeassistant.helpers.normalized_name_base_registry import (

View file

@ -1,4 +1,5 @@
"""Tests for ratelimit.""" """Tests for ratelimit."""
import asyncio import asyncio
from datetime import timedelta from datetime import timedelta

View file

@ -1,4 +1,5 @@
"""Tests for the reload helper.""" """Tests for the reload helper."""
import logging import logging
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch

View file

@ -1,4 +1,5 @@
"""The tests for the Script component.""" """The tests for the Script component."""
import asyncio import asyncio
from contextlib import contextmanager from contextlib import contextmanager
from datetime import timedelta from datetime import timedelta

View file

@ -1,4 +1,5 @@
"""Test script variables.""" """Test script variables."""
import pytest import pytest
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View file

@ -1,4 +1,5 @@
"""Test service helpers.""" """Test service helpers."""
import asyncio import asyncio
from collections.abc import Iterable from collections.abc import Iterable
from copy import deepcopy from copy import deepcopy

View file

@ -1,4 +1,5 @@
"""Test significant change helper.""" """Test significant change helper."""
import pytest import pytest
from homeassistant.components.sensor import SensorDeviceClass from homeassistant.components.sensor import SensorDeviceClass

View file

@ -1,4 +1,5 @@
"""Test starting HA helpers.""" """Test starting HA helpers."""
import pytest import pytest
from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STARTED from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STARTED

View file

@ -1,4 +1,5 @@
"""Test state helpers.""" """Test state helpers."""
import asyncio import asyncio
from unittest.mock import patch from unittest.mock import patch

View file

@ -1,4 +1,5 @@
"""Tests for the storage helper.""" """Tests for the storage helper."""
import asyncio import asyncio
from datetime import timedelta from datetime import timedelta
import json import json

View file

@ -1,4 +1,5 @@
"""Tests for the system info helper.""" """Tests for the system info helper."""
import json import json
import os import os
from unittest.mock import patch from unittest.mock import patch

View file

@ -1,4 +1,5 @@
"""Tests Home Assistant temperature helpers.""" """Tests Home Assistant temperature helpers."""
import pytest import pytest
from homeassistant.const import ( from homeassistant.const import (

View file

@ -1,4 +1,5 @@
"""Test the translation helper.""" """Test the translation helper."""
import asyncio import asyncio
from os import path from os import path
import pathlib import pathlib

View file

@ -1,4 +1,5 @@
"""Test the auth script to manage local users.""" """Test the auth script to manage local users."""
import logging import logging
from typing import Any from typing import Any
from unittest.mock import Mock, patch from unittest.mock import Mock, patch

View file

@ -1,4 +1,5 @@
"""Test check_config script.""" """Test check_config script."""
import logging import logging
from unittest.mock import patch from unittest.mock import patch

View file

@ -1,4 +1,5 @@
"""Test the bootstrapping.""" """Test the bootstrapping."""
import asyncio import asyncio
from collections.abc import Generator, Iterable from collections.abc import Generator, Iterable
import glob import glob

View file

@ -1,4 +1,5 @@
"""Test to check for circular imports in core components.""" """Test to check for circular imports in core components."""
import asyncio import asyncio
import sys import sys

View file

@ -1,4 +1,5 @@
"""Test the flow classes.""" """Test the flow classes."""
import asyncio import asyncio
import dataclasses import dataclasses
import logging import logging

View file

@ -1,4 +1,5 @@
"""Test to verify that we can load components.""" """Test to verify that we can load components."""
import asyncio import asyncio
import os import os
import sys import sys

View file

@ -1,4 +1,5 @@
"""Test requirements module.""" """Test requirements module."""
import asyncio import asyncio
import logging import logging
import os import os

View file

@ -1,4 +1,5 @@
"""Test the runner.""" """Test the runner."""
import asyncio import asyncio
from collections.abc import Iterator from collections.abc import Iterator
import threading import threading

View file

@ -1,4 +1,5 @@
"""Aiohttp test utils.""" """Aiohttp test utils."""
import asyncio import asyncio
from contextlib import contextmanager from contextlib import contextmanager
from http import HTTPStatus from http import HTTPStatus

View file

@ -1,4 +1,5 @@
"""Tests for our aiohttp mocker.""" """Tests for our aiohttp mocker."""
import pytest import pytest
from .aiohttp import AiohttpClientMocker from .aiohttp import AiohttpClientMocker

View file

@ -2,6 +2,7 @@
Call init before using it in your tests to ensure clean test data. Call init before using it in your tests to ensure clean test data.
""" """
import logging import logging
from homeassistant.components.button import ButtonEntity from homeassistant.components.button import ButtonEntity

View file

@ -1,4 +1,5 @@
"""Tests for async util methods from Python source.""" """Tests for async util methods from Python source."""
import asyncio import asyncio
import sys import sys
import time import time

View file

@ -1,4 +1,5 @@
"""Test Home Assistant color util methods.""" """Test Home Assistant color util methods."""
import math import math
import pytest import pytest

View file

@ -1,4 +1,5 @@
"""Test Home Assistant file utility functions.""" """Test Home Assistant file utility functions."""
import os import os
from pathlib import Path from pathlib import Path
from unittest.mock import patch from unittest.mock import patch

View file

@ -1,4 +1,5 @@
"""Test Home Assistant logging util methods.""" """Test Home Assistant logging util methods."""
import asyncio import asyncio
from functools import partial from functools import partial
import logging import logging

View file

@ -1,4 +1,5 @@
"""Test Home Assistant package util methods.""" """Test Home Assistant package util methods."""
import asyncio import asyncio
from importlib.metadata import metadata from importlib.metadata import metadata
import logging import logging

View file

@ -1,4 +1,5 @@
"""Test read only dictionary.""" """Test read only dictionary."""
import json import json
import pytest import pytest

View file

@ -1,4 +1,5 @@
"""Test Home Assistant timeout handler.""" """Test Home Assistant timeout handler."""
import asyncio import asyncio
from contextlib import suppress from contextlib import suppress
import time import time

View file

@ -1,4 +1,5 @@
"""Test inputs.""" """Test inputs."""
import pytest import pytest
from homeassistant.util.yaml import ( from homeassistant.util.yaml import (