Update mypy-dev to 1.18.0a2 (#148880)

This commit is contained in:
Marc Mueller 2025-07-16 14:43:55 +02:00 committed by GitHub
parent 62e3802ff2
commit 0d79f7db51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 17 additions and 17 deletions

View File

@ -27,4 +27,4 @@ def create_api(hass: HomeAssistant, host: str, enable_ime: bool) -> AndroidTVRem
def get_enable_ime(entry: AndroidTVRemoteConfigEntry) -> bool:
"""Get value of enable_ime option or its default value."""
return entry.options.get(CONF_ENABLE_IME, CONF_ENABLE_IME_DEFAULT_VALUE)
return entry.options.get(CONF_ENABLE_IME, CONF_ENABLE_IME_DEFAULT_VALUE) # type: ignore[no-any-return]

View File

@ -45,7 +45,7 @@ class BTHomePassiveBluetoothProcessorCoordinator(
@property
def sleepy_device(self) -> bool:
"""Return True if the device is a sleepy device."""
return self.entry.data.get(CONF_SLEEPY_DEVICE, self.device_data.sleepy_device)
return self.entry.data.get(CONF_SLEEPY_DEVICE, self.device_data.sleepy_device) # type: ignore[no-any-return]
class BTHomePassiveBluetoothDataProcessor[_T](

View File

@ -70,7 +70,7 @@ def get_event_classes_by_device_id(hass: HomeAssistant, device_id: str) -> list[
bthome_config_entry = next(
entry for entry in config_entries if entry and entry.domain == DOMAIN
)
return bthome_config_entry.data.get(CONF_DISCOVERED_EVENT_CLASSES, [])
return bthome_config_entry.data.get(CONF_DISCOVERED_EVENT_CLASSES, []) # type: ignore[no-any-return]
def get_event_types_by_event_class(event_class: str) -> set[str]:

View File

@ -54,7 +54,7 @@ class IslamicPrayerDataUpdateCoordinator(DataUpdateCoordinator[dict[str, datetim
@property
def calc_method(self) -> str:
"""Return the calculation method."""
return self.config_entry.options.get(CONF_CALC_METHOD, DEFAULT_CALC_METHOD)
return self.config_entry.options.get(CONF_CALC_METHOD, DEFAULT_CALC_METHOD) # type: ignore[no-any-return]
@property
def lat_adj_method(self) -> str:
@ -68,12 +68,12 @@ class IslamicPrayerDataUpdateCoordinator(DataUpdateCoordinator[dict[str, datetim
@property
def midnight_mode(self) -> str:
"""Return the midnight mode."""
return self.config_entry.options.get(CONF_MIDNIGHT_MODE, DEFAULT_MIDNIGHT_MODE)
return self.config_entry.options.get(CONF_MIDNIGHT_MODE, DEFAULT_MIDNIGHT_MODE) # type: ignore[no-any-return]
@property
def school(self) -> str:
"""Return the school."""
return self.config_entry.options.get(CONF_SCHOOL, DEFAULT_SCHOOL)
return self.config_entry.options.get(CONF_SCHOOL, DEFAULT_SCHOOL) # type: ignore[no-any-return]
def get_new_prayer_times(self, for_date: date) -> dict[str, Any]:
"""Fetch prayer times for the specified date."""

View File

@ -83,12 +83,12 @@ class MikrotikData:
@property
def arp_enabled(self) -> bool:
"""Return arp_ping option setting."""
return self.config_entry.options.get(CONF_ARP_PING, False)
return self.config_entry.options.get(CONF_ARP_PING, False) # type: ignore[no-any-return]
@property
def force_dhcp(self) -> bool:
"""Return force_dhcp option setting."""
return self.config_entry.options.get(CONF_FORCE_DHCP, False)
return self.config_entry.options.get(CONF_FORCE_DHCP, False) # type: ignore[no-any-return]
def get_info(self, param: str) -> str:
"""Return device model name."""

View File

@ -163,7 +163,7 @@ class ShellyCoordinatorBase[_DeviceT: BlockDevice | RpcDevice](
@property
def sleep_period(self) -> int:
"""Sleep period of the device."""
return self.config_entry.data.get(CONF_SLEEP_PERIOD, 0)
return self.config_entry.data.get(CONF_SLEEP_PERIOD, 0) # type: ignore[no-any-return]
def async_setup(self, pending_platforms: list[Platform] | None = None) -> None:
"""Set up the coordinator."""

View File

@ -451,7 +451,7 @@ def get_rpc_entity_name(
def get_device_entry_gen(entry: ConfigEntry) -> int:
"""Return the device generation from config entry."""
return entry.data.get(CONF_GEN, 1)
return entry.data.get(CONF_GEN, 1) # type: ignore[no-any-return]
def get_rpc_key_instances(

View File

@ -287,7 +287,7 @@ class SqueezeBoxMediaPlayerEntity(SqueezeboxEntity, MediaPlayerEntity):
@property
def browse_limit(self) -> int:
"""Return the step to be used for volume up down."""
return self.coordinator.config_entry.options.get(
return self.coordinator.config_entry.options.get( # type: ignore[no-any-return]
CONF_BROWSE_LIMIT, DEFAULT_BROWSE_LIMIT
)

View File

@ -60,12 +60,12 @@ class TransmissionDataUpdateCoordinator(DataUpdateCoordinator[SessionStats]):
@property
def limit(self) -> int:
"""Return limit."""
return self.config_entry.options.get(CONF_LIMIT, DEFAULT_LIMIT)
return self.config_entry.options.get(CONF_LIMIT, DEFAULT_LIMIT) # type: ignore[no-any-return]
@property
def order(self) -> str:
"""Return order."""
return self.config_entry.options.get(CONF_ORDER, DEFAULT_ORDER)
return self.config_entry.options.get(CONF_ORDER, DEFAULT_ORDER) # type: ignore[no-any-return]
async def _async_update_data(self) -> SessionStats:
"""Update transmission data."""

View File

@ -93,12 +93,12 @@ class ProtectData:
@property
def disable_stream(self) -> bool:
"""Check if RTSP is disabled."""
return self._entry.options.get(CONF_DISABLE_RTSP, False)
return self._entry.options.get(CONF_DISABLE_RTSP, False) # type: ignore[no-any-return]
@property
def max_events(self) -> int:
"""Max number of events to load at once."""
return self._entry.options.get(CONF_MAX_MEDIA, DEFAULT_MAX_MEDIA)
return self._entry.options.get(CONF_MAX_MEDIA, DEFAULT_MAX_MEDIA) # type: ignore[no-any-return]
@callback
def async_subscribe_adopt(

View File

@ -67,7 +67,7 @@ class XiaomiActiveBluetoothProcessorCoordinator(
@property
def sleepy_device(self) -> bool:
"""Return True if the device is a sleepy device."""
return self.entry.data.get(CONF_SLEEPY_DEVICE, self.device_data.sleepy_device)
return self.entry.data.get(CONF_SLEEPY_DEVICE, self.device_data.sleepy_device) # type: ignore[no-any-return]
class XiaomiPassiveBluetoothDataProcessor[_T](

View File

@ -13,7 +13,7 @@ freezegun==1.5.2
go2rtc-client==0.2.1
license-expression==30.4.3
mock-open==1.4.0
mypy-dev==1.17.0a4
mypy-dev==1.18.0a2
pre-commit==4.2.0
pydantic==2.11.7
pylint==3.3.7