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