mirror of
https://github.com/home-assistant/core.git
synced 2025-06-25 01:21:51 +02:00
Cleanup pylint obsolete import checks (#131904)
This commit is contained in:
@ -37,140 +37,6 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
||||
constant=re.compile(r"^cached_property$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.alarm_control_panel": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by AlarmControlPanelEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by CodeFormat enum",
|
||||
constant=re.compile(r"^FORMAT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.alarm_control_panel.const": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by AlarmControlPanelEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by CodeFormat enum",
|
||||
constant=re.compile(r"^FORMAT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.automation": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by TriggerActionType from helpers.trigger",
|
||||
constant=re.compile(r"^AutomationActionType$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by TriggerData from helpers.trigger",
|
||||
constant=re.compile(r"^AutomationTriggerData$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by TriggerInfo from helpers.trigger",
|
||||
constant=re.compile(r"^AutomationTriggerInfo$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.binary_sensor": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by BinarySensorDeviceClass enum",
|
||||
constant=re.compile(r"^DEVICE_CLASS_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.camera": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by CameraEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by StreamType enum",
|
||||
constant=re.compile(r"^STREAM_TYPE_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.camera.const": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by StreamType enum",
|
||||
constant=re.compile(r"^STREAM_TYPE_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.climate": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by HVACMode enum",
|
||||
constant=re.compile(r"^HVAC_MODE_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by ClimateEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.climate.const": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by HVACAction enum",
|
||||
constant=re.compile(r"^CURRENT_HVAC_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by HVACMode enum",
|
||||
constant=re.compile(r"^HVAC_MODE_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by ClimateEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.cover": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by CoverDeviceClass enum",
|
||||
constant=re.compile(r"^DEVICE_CLASS_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by CoverEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.device_tracker": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by SourceType enum",
|
||||
constant=re.compile(r"^SOURCE_TYPE_\w+$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.device_tracker.const": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by SourceType enum",
|
||||
constant=re.compile(r"^SOURCE_TYPE_\w+$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.fan": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by FanEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.humidifier": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by HumidifierDeviceClass enum",
|
||||
constant=re.compile(r"^DEVICE_CLASS_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by HumidifierEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.humidifier.const": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by HumidifierDeviceClass enum",
|
||||
constant=re.compile(r"^DEVICE_CLASS_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by HumidifierEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.lock": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by LockEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.light": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by ColorMode enum",
|
||||
@ -225,52 +91,12 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
||||
constant=re.compile(r"^REPEAT_MODE(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.remote": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by RemoteEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.sensor": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by SensorDeviceClass enum",
|
||||
constant=re.compile(r"^DEVICE_CLASS_(?!STATE_CLASSES)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by SensorStateClass enum",
|
||||
constant=re.compile(r"^STATE_CLASS_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.siren": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by SirenEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.siren.const": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by SirenEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.switch": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by SwitchDeviceClass enum",
|
||||
constant=re.compile(r"^DEVICE_CLASS_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.vacuum": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by VacuumEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.water_heater": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by WaterHeaterEntityFeature enum",
|
||||
constant=re.compile(r"^SUPPORT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.config_entries": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by ConfigEntryDisabler enum",
|
||||
@ -282,86 +108,6 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
||||
reason="replaced by local constants",
|
||||
constant=re.compile(r"^CONF_UNIT_SYSTEM_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^DATA_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by ***DeviceClass enum",
|
||||
constant=re.compile(r"^DEVICE_CLASS_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^ELECTRIC_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^ENERGY_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by EntityCategory enum",
|
||||
constant=re.compile(r"^(ENTITY_CATEGORY_(\w+))|(ENTITY_CATEGORIES)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^FREQUENCY_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^IRRADIATION_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^LENGTH_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^MASS_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^POWER_(?!VOLT_AMPERE_REACTIVE)(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^PRECIPITATION_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^PRESSURE_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^SOUND_PRESSURE_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^SPEED_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^TEMP_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^TIME_(\w+)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit enums",
|
||||
constant=re.compile(r"^VOLUME_(\w+)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.core": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by ConfigSource enum",
|
||||
constant=re.compile(r"^SOURCE_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.data_entry_flow": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by FlowResultType enum",
|
||||
constant=re.compile(r"^RESULT_TYPE_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.helpers.config_validation": [
|
||||
ObsoleteImportMatch(
|
||||
@ -369,12 +115,6 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
||||
constant=re.compile(r"^PLATFORM_SCHEMA(_BASE)?$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.helpers.device_registry": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by DeviceEntryDisabler enum",
|
||||
constant=re.compile(r"^DISABLED_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.helpers.json": [
|
||||
ObsoleteImportMatch(
|
||||
reason="moved to homeassistant.util.json",
|
||||
@ -383,12 +123,6 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
||||
),
|
||||
),
|
||||
],
|
||||
"homeassistant.util": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by unit_conversion.***Converter",
|
||||
constant=re.compile(r"^(distance|pressure|speed|temperature|volume)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.util.unit_system": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by US_CUSTOMARY_SYSTEM",
|
||||
|
Reference in New Issue
Block a user