diff --git a/.strict-typing b/.strict-typing index 0d160982a07b5a..f0f4e34c505f91 100644 --- a/.strict-typing +++ b/.strict-typing @@ -365,6 +365,7 @@ homeassistant.components.otbr.* homeassistant.components.overkiz.* homeassistant.components.overseerr.* homeassistant.components.p1_monitor.* +homeassistant.components.pandora.* homeassistant.components.panel_custom.* homeassistant.components.peblar.* homeassistant.components.peco.* diff --git a/homeassistant/components/pandora/media_player.py b/homeassistant/components/pandora/media_player.py index eea88da6e36c01..0b2f5b7055ffc3 100644 --- a/homeassistant/components/pandora/media_player.py +++ b/homeassistant/components/pandora/media_player.py @@ -310,7 +310,7 @@ def _update_stations(self) -> None: station_lines = self._pianobar.before or "" _LOGGER.debug("Getting stations: %s", station_lines) self._attr_source_list = [] - for line in station_lines.split("\r\n"): + for line in station_lines.splitlines(): if match := re.search(r"\d+\).....(.+)", line): station = match.group(1).strip() _LOGGER.debug("Found station %s", station) diff --git a/mypy.ini b/mypy.ini index 8600e5ba165eb3..e393b32f9fdb07 100644 --- a/mypy.ini +++ b/mypy.ini @@ -3406,6 +3406,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.pandora.*] +check_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_decorators = true +disallow_untyped_defs = true +warn_return_any = true +warn_unreachable = true + [mypy-homeassistant.components.panel_custom.*] check_untyped_defs = true disallow_incomplete_defs = true