Don't del unused parameters, HA pylint doesn't care

This commit is contained in:
Michael "Chishm" Chisholm
2021-10-02 21:49:26 +10:00
parent a4961c0755
commit 03e1305def
2 changed files with 0 additions and 6 deletions

View File

@@ -44,7 +44,6 @@ class DlnaDmrData:
async def async_cleanup_event_notifiers(self, event: Event) -> None: async def async_cleanup_event_notifiers(self, event: Event) -> None:
"""Clean up resources when Home Assistant is stopped.""" """Clean up resources when Home Assistant is stopped."""
del event # unused
LOGGER.debug("Cleaning resources in DlnaDmrData") LOGGER.debug("Cleaning resources in DlnaDmrData")
async with self.lock: async with self.lock:
tasks = (server.stop_server() for server in self.event_notifiers.values()) tasks = (server.stop_server() for server in self.event_notifiers.values())

View File

@@ -105,8 +105,6 @@ async def async_setup_platform(
discovery_info: DiscoveryInfoType | None = None, discovery_info: DiscoveryInfoType | None = None,
) -> None: ) -> None:
"""Set up DLNA media_player platform.""" """Set up DLNA media_player platform."""
del async_add_entities, discovery_info # Unused
hass.async_create_task( hass.async_create_task(
hass.config_entries.flow.async_init( hass.config_entries.flow.async_init(
DOMAIN, DOMAIN,
@@ -129,7 +127,6 @@ async def async_setup_entry(
async_add_entities: AddEntitiesCallback, async_add_entities: AddEntitiesCallback,
) -> None: ) -> None:
"""Set up the DlnaDmrEntity from a config entry.""" """Set up the DlnaDmrEntity from a config entry."""
del hass # Unused
_LOGGER.debug("media_player.async_setup_entry %s (%s)", entry.entry_id, entry.title) _LOGGER.debug("media_player.async_setup_entry %s (%s)", entry.entry_id, entry.title)
# Create our own device-wrapping entity # Create our own device-wrapping entity
@@ -287,7 +284,6 @@ class DlnaDmrEntity(MediaPlayerEntity):
self, hass: HomeAssistant, entry: config_entries.ConfigEntry self, hass: HomeAssistant, entry: config_entries.ConfigEntry
) -> None: ) -> None:
"""Handle options update by modifying self in-place.""" """Handle options update by modifying self in-place."""
del hass # Unused
_LOGGER.debug( _LOGGER.debug(
"Updating: %s with data=%s and options=%s", "Updating: %s with data=%s and options=%s",
self.name, self.name,
@@ -441,7 +437,6 @@ class DlnaDmrEntity(MediaPlayerEntity):
self, service: UpnpService, state_variables: Sequence[UpnpStateVariable] self, service: UpnpService, state_variables: Sequence[UpnpStateVariable]
) -> None: ) -> None:
"""State variable(s) changed, let home-assistant know.""" """State variable(s) changed, let home-assistant know."""
del service # Unused
if not state_variables: if not state_variables:
# Indicates a failure to resubscribe, check if device is still available # Indicates a failure to resubscribe, check if device is still available
self.check_available = True self.check_available = True