mirror of
https://github.com/home-assistant/core.git
synced 2025-04-19 14:57:52 +00:00
Enable strict typing for pandora (#134536)
This commit is contained in:
parent
36582f9ac2
commit
afa95293dc
@ -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.*
|
||||
|
@ -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)
|
||||
|
10
mypy.ini
10
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user