Replace pylint protected-access with Ruff SLF001 (#115735)
This commit is contained in:
parent
460c05dc43
commit
b456d97e65
90 changed files with 168 additions and 223 deletions
|
@ -162,7 +162,7 @@ class CastStatusListener(
|
|||
self._valid = True
|
||||
self._mz_mgr = mz_mgr
|
||||
|
||||
if cast_device._cast_info.is_audio_group:
|
||||
if cast_device._cast_info.is_audio_group: # noqa: SLF001
|
||||
self._mz_mgr.add_multizone(chromecast)
|
||||
if mz_only:
|
||||
return
|
||||
|
@ -170,7 +170,7 @@ class CastStatusListener(
|
|||
chromecast.register_status_listener(self)
|
||||
chromecast.socket_client.media_controller.register_status_listener(self)
|
||||
chromecast.register_connection_listener(self)
|
||||
if not cast_device._cast_info.is_audio_group:
|
||||
if not cast_device._cast_info.is_audio_group: # noqa: SLF001
|
||||
self._mz_mgr.register_listener(chromecast.uuid, self)
|
||||
|
||||
def new_cast_status(self, status):
|
||||
|
@ -214,8 +214,7 @@ class CastStatusListener(
|
|||
|
||||
All following callbacks won't be forwarded.
|
||||
"""
|
||||
# pylint: disable-next=protected-access
|
||||
if self._cast_device._cast_info.is_audio_group:
|
||||
if self._cast_device._cast_info.is_audio_group: # noqa: SLF001
|
||||
self._mz_mgr.remove_multizone(self._uuid)
|
||||
else:
|
||||
self._mz_mgr.deregister_listener(self._uuid, self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue