diff --git a/.strict-typing b/.strict-typing index 0d160982a07b5ae4192ef0fda413afa86b129a28..f0f4e34c505f913eaedc84530ec72a5a80fbbcd2 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 eea88da6e36c016f1d8e73561a04c72deeb9ff62..0b2f5b7055ffc30f0a50b8f0a55c66b24c1a5c86 100644 --- a/homeassistant/components/pandora/media_player.py +++ b/homeassistant/components/pandora/media_player.py @@ -310,7 +310,7 @@ class PandoraMediaPlayer(MediaPlayerEntity): 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 8600e5ba165eb371d2a0a83c95574c91b72a0980..e393b32f9fdb07e0701ed04800f2ce37b8355fec 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