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
|
@ -324,7 +324,7 @@ def library_section_payload(section):
|
|||
children_media_class = ITEM_TYPE_MEDIA_CLASS[section.TYPE]
|
||||
except KeyError as err:
|
||||
raise UnknownMediaType(f"Unknown type received: {section.TYPE}") from err
|
||||
server_id = section._server.machineIdentifier # pylint: disable=protected-access
|
||||
server_id = section._server.machineIdentifier # noqa: SLF001
|
||||
return BrowseMedia(
|
||||
title=section.title,
|
||||
media_class=MediaClass.DIRECTORY,
|
||||
|
@ -357,7 +357,7 @@ def hub_payload(hub):
|
|||
media_content_id = f"{hub.librarySectionID}/{hub.hubIdentifier}"
|
||||
else:
|
||||
media_content_id = f"server/{hub.hubIdentifier}"
|
||||
server_id = hub._server.machineIdentifier # pylint: disable=protected-access
|
||||
server_id = hub._server.machineIdentifier # noqa: SLF001
|
||||
payload = {
|
||||
"title": hub.title,
|
||||
"media_class": MediaClass.DIRECTORY,
|
||||
|
@ -371,7 +371,7 @@ def hub_payload(hub):
|
|||
|
||||
def station_payload(station):
|
||||
"""Create response payload for a music station."""
|
||||
server_id = station._server.machineIdentifier # pylint: disable=protected-access
|
||||
server_id = station._server.machineIdentifier # noqa: SLF001
|
||||
return BrowseMedia(
|
||||
title=station.title,
|
||||
media_class=ITEM_TYPE_MEDIA_CLASS[station.type],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue