From 0471b2717907a42916a50a219bd95df1e186fbc7 Mon Sep 17 00:00:00 2001 From: Milan Meulemans Date: Tue, 27 Jul 2021 12:30:56 +0200 Subject: [PATCH] Replace HomeAssistantType with HomeAssistant (#53545) --- homeassistant/components/hyperion/camera.py | 5 ++--- homeassistant/components/lcn/__init__.py | 9 +++++---- homeassistant/components/lcn/binary_sensor.py | 7 ++++--- homeassistant/components/lcn/climate.py | 7 ++++--- homeassistant/components/lcn/config_flow.py | 5 +++-- homeassistant/components/lcn/cover.py | 7 ++++--- homeassistant/components/lcn/helpers.py | 5 +++-- homeassistant/components/lcn/light.py | 7 ++++--- homeassistant/components/lcn/scene.py | 7 ++++--- homeassistant/components/lcn/sensor.py | 7 ++++--- homeassistant/components/lcn/services.py | 5 +++-- homeassistant/components/lcn/switch.py | 7 ++++--- homeassistant/components/meteoclimatic/sensor.py | 4 ++-- homeassistant/components/modern_forms/fan.py | 4 ++-- homeassistant/components/modern_forms/light.py | 4 ++-- homeassistant/components/philips_js/light.py | 5 ++--- homeassistant/components/siren/__init__.py | 10 +++++----- .../components/yamaha_musiccast/media_player.py | 8 ++++---- 18 files changed, 61 insertions(+), 52 deletions(-) diff --git a/homeassistant/components/hyperion/camera.py b/homeassistant/components/hyperion/camera.py index 1ef88969228..22134400a45 100644 --- a/homeassistant/components/hyperion/camera.py +++ b/homeassistant/components/hyperion/camera.py @@ -27,14 +27,13 @@ from homeassistant.components.camera import ( async_get_still_stream, ) from homeassistant.config_entries import ConfigEntry -from homeassistant.core import callback +from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import ( async_dispatcher_connect, async_dispatcher_send, ) from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import HomeAssistantType from . import ( get_hyperion_device_id, @@ -57,7 +56,7 @@ IMAGE_STREAM_JPG_SENTINEL = "data:image/jpg;base64," async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: diff --git a/homeassistant/components/lcn/__init__.py b/homeassistant/components/lcn/__init__.py index 7a6a7c5fab6..9db564812a8 100644 --- a/homeassistant/components/lcn/__init__.py +++ b/homeassistant/components/lcn/__init__.py @@ -15,9 +15,10 @@ from homeassistant.const import ( CONF_RESOURCE, CONF_USERNAME, ) +from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er from homeassistant.helpers.entity import Entity -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.helpers.typing import ConfigType from .const import CONF_DIM_MODE, CONF_SK_NUM_TRIES, CONNECTION, DOMAIN, PLATFORMS from .helpers import ( @@ -32,7 +33,7 @@ from .services import SERVICES _LOGGER = logging.getLogger(__name__) -async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool: +async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the LCN component.""" if DOMAIN not in config: return True @@ -53,7 +54,7 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool: async def async_setup_entry( - hass: HomeAssistantType, config_entry: config_entries.ConfigEntry + hass: HomeAssistant, config_entry: config_entries.ConfigEntry ) -> bool: """Set up a connection to PCHK host from a config entry.""" hass.data.setdefault(DOMAIN, {}) @@ -116,7 +117,7 @@ async def async_setup_entry( async def async_unload_entry( - hass: HomeAssistantType, config_entry: config_entries.ConfigEntry + hass: HomeAssistant, config_entry: config_entries.ConfigEntry ) -> bool: """Close connection to PCHK host represented by config_entry.""" # forward unloading to platforms diff --git a/homeassistant/components/lcn/binary_sensor.py b/homeassistant/components/lcn/binary_sensor.py index 45bd45c8fd7..13a2a5b3bb3 100644 --- a/homeassistant/components/lcn/binary_sensor.py +++ b/homeassistant/components/lcn/binary_sensor.py @@ -9,8 +9,9 @@ from homeassistant.components.binary_sensor import ( ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_ADDRESS, CONF_DOMAIN, CONF_ENTITIES, CONF_SOURCE +from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.helpers.typing import ConfigType from . import LcnEntity from .const import BINSENSOR_PORTS, CONF_DOMAIN_DATA, SETPOINTS @@ -18,7 +19,7 @@ from .helpers import DeviceConnectionType, InputType, get_device_connection def create_lcn_binary_sensor_entity( - hass: HomeAssistantType, entity_config: ConfigType, config_entry: ConfigEntry + hass: HomeAssistant, entity_config: ConfigType, config_entry: ConfigEntry ) -> LcnEntity: """Set up an entity for this domain.""" device_connection = get_device_connection( @@ -36,7 +37,7 @@ def create_lcn_binary_sensor_entity( async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: diff --git a/homeassistant/components/lcn/climate.py b/homeassistant/components/lcn/climate.py index 3bd8b551c49..4254a5e5480 100644 --- a/homeassistant/components/lcn/climate.py +++ b/homeassistant/components/lcn/climate.py @@ -21,8 +21,9 @@ from homeassistant.const import ( TEMP_CELSIUS, TEMP_FAHRENHEIT, ) +from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.helpers.typing import ConfigType from . import LcnEntity from .const import ( @@ -38,7 +39,7 @@ PARALLEL_UPDATES = 0 def create_lcn_climate_entity( - hass: HomeAssistantType, entity_config: ConfigType, config_entry: ConfigEntry + hass: HomeAssistant, entity_config: ConfigType, config_entry: ConfigEntry ) -> LcnEntity: """Set up an entity for this domain.""" device_connection = get_device_connection( @@ -49,7 +50,7 @@ def create_lcn_climate_entity( async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: diff --git a/homeassistant/components/lcn/config_flow.py b/homeassistant/components/lcn/config_flow.py index 9ac8cc7f1fa..905da4d005c 100644 --- a/homeassistant/components/lcn/config_flow.py +++ b/homeassistant/components/lcn/config_flow.py @@ -13,8 +13,9 @@ from homeassistant.const import ( CONF_PORT, CONF_USERNAME, ) +from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResult -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.helpers.typing import ConfigType from .const import CONF_DIM_MODE, CONF_SK_NUM_TRIES, DOMAIN @@ -22,7 +23,7 @@ _LOGGER = logging.getLogger(__name__) def get_config_entry( - hass: HomeAssistantType, data: ConfigType + hass: HomeAssistant, data: ConfigType ) -> config_entries.ConfigEntry | None: """Check config entries for already configured entries based on the ip address/port.""" return next( diff --git a/homeassistant/components/lcn/cover.py b/homeassistant/components/lcn/cover.py index 608881435dc..bc83da55888 100644 --- a/homeassistant/components/lcn/cover.py +++ b/homeassistant/components/lcn/cover.py @@ -8,8 +8,9 @@ import pypck from homeassistant.components.cover import DOMAIN as DOMAIN_COVER, CoverEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_ADDRESS, CONF_DOMAIN, CONF_ENTITIES +from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.helpers.typing import ConfigType from . import LcnEntity from .const import CONF_DOMAIN_DATA, CONF_MOTOR, CONF_REVERSE_TIME @@ -19,7 +20,7 @@ PARALLEL_UPDATES = 0 def create_lcn_cover_entity( - hass: HomeAssistantType, entity_config: ConfigType, config_entry: ConfigEntry + hass: HomeAssistant, entity_config: ConfigType, config_entry: ConfigEntry ) -> LcnEntity: """Set up an entity for this domain.""" device_connection = get_device_connection( @@ -33,7 +34,7 @@ def create_lcn_cover_entity( async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: diff --git a/homeassistant/components/lcn/helpers.py b/homeassistant/components/lcn/helpers.py index 07e3866cd48..53026d0294c 100644 --- a/homeassistant/components/lcn/helpers.py +++ b/homeassistant/components/lcn/helpers.py @@ -25,7 +25,8 @@ from homeassistant.const import ( CONF_SWITCHES, CONF_USERNAME, ) -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.core import HomeAssistant +from homeassistant.helpers.typing import ConfigType from .const import ( CONF_CLIMATES, @@ -68,7 +69,7 @@ DOMAIN_LOOKUP = { def get_device_connection( - hass: HomeAssistantType, address: AddressType, config_entry: ConfigEntry + hass: HomeAssistant, address: AddressType, config_entry: ConfigEntry ) -> DeviceConnectionType | None: """Return a lcn device_connection.""" host_connection = hass.data[DOMAIN][config_entry.entry_id][CONNECTION] diff --git a/homeassistant/components/lcn/light.py b/homeassistant/components/lcn/light.py index 2a2d050143c..260dd2212ea 100644 --- a/homeassistant/components/lcn/light.py +++ b/homeassistant/components/lcn/light.py @@ -15,8 +15,9 @@ from homeassistant.components.light import ( ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_ADDRESS, CONF_DOMAIN, CONF_ENTITIES +from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.helpers.typing import ConfigType from . import LcnEntity from .const import ( @@ -32,7 +33,7 @@ PARALLEL_UPDATES = 0 def create_lcn_light_entity( - hass: HomeAssistantType, entity_config: ConfigType, config_entry: ConfigEntry + hass: HomeAssistant, entity_config: ConfigType, config_entry: ConfigEntry ) -> LcnEntity: """Set up an entity for this domain.""" device_connection = get_device_connection( @@ -46,7 +47,7 @@ def create_lcn_light_entity( async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: diff --git a/homeassistant/components/lcn/scene.py b/homeassistant/components/lcn/scene.py index d3faa887dc8..f1980b6475d 100644 --- a/homeassistant/components/lcn/scene.py +++ b/homeassistant/components/lcn/scene.py @@ -8,8 +8,9 @@ import pypck from homeassistant.components.scene import DOMAIN as DOMAIN_SCENE, Scene from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_ADDRESS, CONF_DOMAIN, CONF_ENTITIES, CONF_SCENE +from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.helpers.typing import ConfigType from . import LcnEntity from .const import ( @@ -25,7 +26,7 @@ PARALLEL_UPDATES = 0 def create_lcn_scene_entity( - hass: HomeAssistantType, entity_config: ConfigType, config_entry: ConfigEntry + hass: HomeAssistant, entity_config: ConfigType, config_entry: ConfigEntry ) -> LcnEntity: """Set up an entity for this domain.""" device_connection = get_device_connection( @@ -36,7 +37,7 @@ def create_lcn_scene_entity( async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: diff --git a/homeassistant/components/lcn/sensor.py b/homeassistant/components/lcn/sensor.py index a1451f339f2..fdd6ee51872 100644 --- a/homeassistant/components/lcn/sensor.py +++ b/homeassistant/components/lcn/sensor.py @@ -14,8 +14,9 @@ from homeassistant.const import ( CONF_SOURCE, CONF_UNIT_OF_MEASUREMENT, ) +from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.helpers.typing import ConfigType from . import LcnEntity from .const import ( @@ -30,7 +31,7 @@ from .helpers import DeviceConnectionType, InputType, get_device_connection def create_lcn_sensor_entity( - hass: HomeAssistantType, entity_config: ConfigType, config_entry: ConfigEntry + hass: HomeAssistant, entity_config: ConfigType, config_entry: ConfigEntry ) -> LcnEntity: """Set up an entity for this domain.""" device_connection = get_device_connection( @@ -49,7 +50,7 @@ def create_lcn_sensor_entity( async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: diff --git a/homeassistant/components/lcn/services.py b/homeassistant/components/lcn/services.py index 7df6f4ce2ed..47efc3ea060 100644 --- a/homeassistant/components/lcn/services.py +++ b/homeassistant/components/lcn/services.py @@ -11,8 +11,9 @@ from homeassistant.const import ( CONF_UNIT_OF_MEASUREMENT, TIME_SECONDS, ) +from homeassistant.core import HomeAssistant import homeassistant.helpers.config_validation as cv -from homeassistant.helpers.typing import HomeAssistantType, ServiceCallType +from homeassistant.helpers.typing import ServiceCallType from .const import ( CONF_KEYS, @@ -54,7 +55,7 @@ class LcnServiceCall: schema = vol.Schema({vol.Required(CONF_ADDRESS): is_address}) - def __init__(self, hass: HomeAssistantType) -> None: + def __init__(self, hass: HomeAssistant) -> None: """Initialize service call.""" self.hass = hass diff --git a/homeassistant/components/lcn/switch.py b/homeassistant/components/lcn/switch.py index f5159b3492d..ded15c0f1da 100644 --- a/homeassistant/components/lcn/switch.py +++ b/homeassistant/components/lcn/switch.py @@ -8,8 +8,9 @@ import pypck from homeassistant.components.switch import DOMAIN as DOMAIN_SWITCH, SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_ADDRESS, CONF_DOMAIN, CONF_ENTITIES +from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.helpers.typing import ConfigType from . import LcnEntity from .const import CONF_DOMAIN_DATA, CONF_OUTPUT, OUTPUT_PORTS @@ -19,7 +20,7 @@ PARALLEL_UPDATES = 0 def create_lcn_switch_entity( - hass: HomeAssistantType, entity_config: ConfigType, config_entry: ConfigEntry + hass: HomeAssistant, entity_config: ConfigType, config_entry: ConfigEntry ) -> LcnEntity: """Set up an entity for this domain.""" device_connection = get_device_connection( @@ -33,7 +34,7 @@ def create_lcn_switch_entity( async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: diff --git a/homeassistant/components/meteoclimatic/sensor.py b/homeassistant/components/meteoclimatic/sensor.py index bcd597d4b0c..101b889498d 100644 --- a/homeassistant/components/meteoclimatic/sensor.py +++ b/homeassistant/components/meteoclimatic/sensor.py @@ -4,7 +4,7 @@ import logging from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import ATTR_ATTRIBUTION -from homeassistant.helpers.typing import HomeAssistantType +from homeassistant.core import HomeAssistant from homeassistant.helpers.update_coordinator import ( CoordinatorEntity, DataUpdateCoordinator, @@ -26,7 +26,7 @@ _LOGGER = logging.getLogger(__name__) async def async_setup_entry( - hass: HomeAssistantType, entry: ConfigEntry, async_add_entities + hass: HomeAssistant, entry: ConfigEntry, async_add_entities ) -> None: """Set up the Meteoclimatic sensor platform.""" coordinator = hass.data[DOMAIN][entry.entry_id] diff --git a/homeassistant/components/modern_forms/fan.py b/homeassistant/components/modern_forms/fan.py index db8f2e011a9..7c1da064b18 100644 --- a/homeassistant/components/modern_forms/fan.py +++ b/homeassistant/components/modern_forms/fan.py @@ -8,9 +8,9 @@ import voluptuous as vol from homeassistant.components.fan import SUPPORT_DIRECTION, SUPPORT_SET_SPEED, FanEntity from homeassistant.config_entries import ConfigEntry +from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_platform from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import HomeAssistantType from homeassistant.util.percentage import ( int_states_in_range, percentage_to_ranged_value, @@ -34,7 +34,7 @@ from .const import ( async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: diff --git a/homeassistant/components/modern_forms/light.py b/homeassistant/components/modern_forms/light.py index ee30c0c489f..7431cf0c3bb 100644 --- a/homeassistant/components/modern_forms/light.py +++ b/homeassistant/components/modern_forms/light.py @@ -12,9 +12,9 @@ from homeassistant.components.light import ( LightEntity, ) from homeassistant.config_entries import ConfigEntry +from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_platform from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import HomeAssistantType from homeassistant.util.percentage import ( percentage_to_ranged_value, ranged_value_to_percentage, @@ -39,7 +39,7 @@ BRIGHTNESS_RANGE = (1, 255) async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: diff --git a/homeassistant/components/philips_js/light.py b/homeassistant/components/philips_js/light.py index 4c321468d79..3dbca7611ab 100644 --- a/homeassistant/components/philips_js/light.py +++ b/homeassistant/components/philips_js/light.py @@ -18,8 +18,7 @@ from homeassistant.components.light import ( SUPPORT_EFFECT, LightEntity, ) -from homeassistant.core import callback -from homeassistant.helpers.typing import HomeAssistantType +from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.util.color import color_hsv_to_RGB, color_RGB_to_hsv @@ -34,7 +33,7 @@ EFFECT_EXPERT_STYLES = {"FOLLOW_AUDIO", "FOLLOW_COLOR", "Lounge light"} async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, config_entry: config_entries.ConfigEntry, async_add_entities, ): diff --git a/homeassistant/components/siren/__init__.py b/homeassistant/components/siren/__init__.py index 565e8ca0b7a..f301100fa6c 100644 --- a/homeassistant/components/siren/__init__.py +++ b/homeassistant/components/siren/__init__.py @@ -10,7 +10,7 @@ import voluptuous as vol from homeassistant.config_entries import ConfigEntry from homeassistant.const import SERVICE_TOGGLE, SERVICE_TURN_OFF, SERVICE_TURN_ON -from homeassistant.core import ServiceCall +from homeassistant.core import HomeAssistant, ServiceCall import homeassistant.helpers.config_validation as cv from homeassistant.helpers.config_validation import ( # noqa: F401 PLATFORM_SCHEMA, @@ -18,7 +18,7 @@ from homeassistant.helpers.config_validation import ( # noqa: F401 ) from homeassistant.helpers.entity import ToggleEntity, ToggleEntityDescription from homeassistant.helpers.entity_component import EntityComponent -from homeassistant.helpers.typing import ConfigType, HomeAssistantType +from homeassistant.helpers.typing import ConfigType from .const import ( ATTR_AVAILABLE_TONES, @@ -77,7 +77,7 @@ def process_turn_on_params( return params -async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool: +async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up siren devices.""" component = hass.data[DOMAIN] = EntityComponent( _LOGGER, DOMAIN, hass, SCAN_INTERVAL @@ -110,13 +110,13 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool: return True -async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool: +async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Set up a config entry.""" component: EntityComponent = hass.data[DOMAIN] return await component.async_setup_entry(entry) -async def async_unload_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool: +async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Unload a config entry.""" component: EntityComponent = hass.data[DOMAIN] return await component.async_unload_entry(entry) diff --git a/homeassistant/components/yamaha_musiccast/media_player.py b/homeassistant/components/yamaha_musiccast/media_player.py index 77bc7a21b85..d08ba798bd8 100644 --- a/homeassistant/components/yamaha_musiccast/media_player.py +++ b/homeassistant/components/yamaha_musiccast/media_player.py @@ -34,12 +34,12 @@ from homeassistant.const import ( STATE_PAUSED, STATE_PLAYING, ) -from homeassistant.core import callback +from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import DiscoveryInfoType, HomeAssistantType +from homeassistant.helpers.typing import DiscoveryInfoType from homeassistant.util import uuid from . import MusicCastDataUpdateCoordinator, MusicCastDeviceEntity @@ -79,7 +79,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( async def async_setup_platform( - hass: HomeAssistantType, + hass: HomeAssistant, config, async_add_devices: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None, @@ -107,7 +107,7 @@ async def async_setup_platform( async def async_setup_entry( - hass: HomeAssistantType, + hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: