Remove import annotations from script (#169548)
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
Necessary until copilot can handle skills.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate updated constraint and requirements files."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import difflib
|
||||
import importlib
|
||||
from operator import itemgetter
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate manifests."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
from operator import attrgetter
|
||||
from pathlib import Path
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate application_credentials data."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .model import Config, Integration
|
||||
from .serializer import format_python_namespace
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate bluetooth file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .model import Config, Integration
|
||||
from .serializer import format_python_namespace
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Brand validation."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import voluptuous as vol
|
||||
from voluptuous.humanize import humanize_error
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate CODEOWNERS."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .model import Config, Integration, IntegrationType
|
||||
|
||||
BASE = """
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate conditions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import json
|
||||
import pathlib
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate config flow file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from typing import Any
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate integrations which can be setup from YAML have config schemas."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import ast
|
||||
|
||||
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate dependencies."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import ast
|
||||
from collections import deque
|
||||
import multiprocessing
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate dhcp file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .model import Config, Integration
|
||||
from .serializer import format_python_namespace
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate integration icon translation files."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
import orjson
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Write integration constants."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .model import Config, Integration, IntegrationType
|
||||
from .serializer import format_python
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate integration type is set for config flow integrations."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .model import Config, Integration
|
||||
|
||||
# Integrations with config_flow that are missing integration_type.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate integration JSON files."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
||||
from .model import Config, Integration
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate lab preview features file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .model import Config, Integration
|
||||
from .serializer import format_python_namespace
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Manifest validation."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from enum import StrEnum, auto
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Models for manifest validator."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from enum import IntEnum, StrEnum
|
||||
import json
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate MQTT file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
from .model import Config, Integration
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate mypy config."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable
|
||||
import configparser
|
||||
import io
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate integration quality scale files."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate requirements."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import deque
|
||||
from collections.abc import Collection
|
||||
from functools import cache
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Hassfest utils."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Collection, Iterable, Mapping
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate dependencies."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import json
|
||||
import pathlib
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate ssdp file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
from .model import Config, Integration
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate integration translation files."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from functools import partial
|
||||
import json
|
||||
import re
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Validate triggers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import json
|
||||
import pathlib
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate usb file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .model import Config, Integration
|
||||
from .serializer import format_python_namespace
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Generate zeroconf file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
from homeassistant.loader import (
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Tool to check the licenses."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from argparse import ArgumentParser, Namespace
|
||||
from collections.abc import Sequence
|
||||
from dataclasses import dataclass
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Models for scaffolding."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""The NEW_NAME integration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Config flow for the NEW_NAME integration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""The NEW_NAME integration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""The NEW_NAME integration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Config flow for the NEW_NAME integration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, cast
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Sensor platform for NEW_NAME integration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_ENTITY_ID
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""The NEW_NAME integration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Provides device actions for NEW_NAME."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Provide the device conditions for NEW_NAME."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""The tests for NEW_NAME device conditions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pytest_unordered import unordered
|
||||
|
||||
from homeassistant.components import automation
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Provides device triggers for NEW_NAME."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""The NEW_NAME integration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Reproduce an NEW_NAME state."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Iterable
|
||||
import logging
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Helper to test significant NEW_NAME state changes."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.const import ATTR_DEVICE_CLASS
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Helper script to split test into n buckets."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
from dataclasses import dataclass, field
|
||||
from math import ceil
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Merge all translation sources into a single JSON file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""API for Lokalise."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pprint import pprint
|
||||
|
||||
import requests
|
||||
|
||||
Reference in New Issue
Block a user