Update mypy-dev to 1.15.0a2 (#135633)

pull/135638/head
Marc Mueller 2025-01-15 00:54:54 +01:00 committed by GitHub
parent 6e88c6570e
commit c4d8cda92b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 10 additions and 11 deletions

View File

@ -2147,7 +2147,7 @@ def _migrate_columns_to_timestamp(
) )
) )
result = None result = None
while result is None or result.rowcount > 0: # type: ignore[unreachable] while result is None or result.rowcount > 0:
with session_scope(session=session_maker()) as session: with session_scope(session=session_maker()) as session:
result = session.connection().execute( result = session.connection().execute(
text( text(
@ -2178,7 +2178,7 @@ def _migrate_columns_to_timestamp(
) )
) )
result = None result = None
while result is None or result.rowcount > 0: # type: ignore[unreachable] while result is None or result.rowcount > 0:
with session_scope(session=session_maker()) as session: with session_scope(session=session_maker()) as session:
result = session.connection().execute( result = session.connection().execute(
text( text(
@ -2277,7 +2277,7 @@ def _migrate_statistics_columns_to_timestamp(
# updated all rows in the table until the rowcount is 0 # updated all rows in the table until the rowcount is 0
for table in STATISTICS_TABLES: for table in STATISTICS_TABLES:
result = None result = None
while result is None or result.rowcount > 0: # type: ignore[unreachable] while result is None or result.rowcount > 0:
with session_scope(session=session_maker()) as session: with session_scope(session=session_maker()) as session:
result = session.connection().execute( result = session.connection().execute(
text( text(
@ -2299,7 +2299,7 @@ def _migrate_statistics_columns_to_timestamp(
# updated all rows in the table until the rowcount is 0 # updated all rows in the table until the rowcount is 0
for table in STATISTICS_TABLES: for table in STATISTICS_TABLES:
result = None result = None
while result is None or result.rowcount > 0: # type: ignore[unreachable] while result is None or result.rowcount > 0:
with session_scope(session=session_maker()) as session: with session_scope(session=session_maker()) as session:
result = session.connection().execute( result = session.connection().execute(
text( text(

View File

@ -58,8 +58,8 @@ class LazyState(State):
self.attr_cache = attr_cache self.attr_cache = attr_cache
self.context = EMPTY_CONTEXT self.context = EMPTY_CONTEXT
@cached_property # type: ignore[override] @cached_property
def attributes(self) -> dict[str, Any]: def attributes(self) -> dict[str, Any]: # type: ignore[override]
"""State attributes.""" """State attributes."""
return decode_attributes_from_source( return decode_attributes_from_source(
getattr(self._row, "attributes", None), self.attr_cache getattr(self._row, "attributes", None), self.attr_cache

View File

@ -73,7 +73,7 @@ def valid_schedule(schedule: list[dict[str, str]]) -> list[dict[str, str]]:
) )
# Check if the from time of the event is after the to time of the previous event # Check if the from time of the event is after the to time of the previous event
if previous_to is not None and previous_to > time_range[CONF_FROM]: # type: ignore[unreachable] if previous_to is not None and previous_to > time_range[CONF_FROM]:
raise vol.Invalid("Overlapping times found in schedule") raise vol.Invalid("Overlapping times found in schedule")
previous_to = time_range[CONF_TO] previous_to = time_range[CONF_TO]

View File

@ -70,8 +70,7 @@ class TwenteMilieuCalendar(TwenteMilieuEntity, CalendarEntity):
waste_dates waste_dates
and ( and (
next_waste_pickup_date is None next_waste_pickup_date is None
or waste_dates[0] # type: ignore[unreachable] or waste_dates[0] < next_waste_pickup_date
< next_waste_pickup_date
) )
and waste_dates[0] >= dt_util.now().date() and waste_dates[0] >= dt_util.now().date()
): ):

View File

@ -61,7 +61,7 @@ class ZHADeviceScannerEntity(ScannerEntity, ZHAEntity):
""" """
return self.entity_data.entity.battery_level return self.entity_data.entity.battery_level
@property # type: ignore[explicit-override, misc] @property # type: ignore[misc]
def device_info(self) -> DeviceInfo: def device_info(self) -> DeviceInfo:
"""Return device info.""" """Return device info."""
# We opt ZHA device tracker back into overriding this method because # We opt ZHA device tracker back into overriding this method because

View File

@ -12,7 +12,7 @@ coverage==7.6.8
freezegun==1.5.1 freezegun==1.5.1
license-expression==30.4.0 license-expression==30.4.0
mock-open==1.4.0 mock-open==1.4.0
mypy-dev==1.15.0a1 mypy-dev==1.15.0a2
pre-commit==4.0.0 pre-commit==4.0.0
pydantic==2.10.4 pydantic==2.10.4
pylint==3.3.2 pylint==3.3.2