Add missing typing to Spotify (#34698)

This commit is contained in:
rako77 2020-04-26 12:25:58 -07:00 committed by GitHub
parent 066e921a8b
commit ca6243c18a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ from homeassistant.const import (
STATE_PLAYING, STATE_PLAYING,
) )
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.config_entry_oauth2_flow import OAuth2Session
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
from homeassistant.util.dt import utc_from_timestamp from homeassistant.util.dt import utc_from_timestamp
@ -93,7 +94,14 @@ def spotify_exception_handler(func):
class SpotifyMediaPlayer(MediaPlayerEntity): class SpotifyMediaPlayer(MediaPlayerEntity):
"""Representation of a Spotify controller.""" """Representation of a Spotify controller."""
def __init__(self, session, spotify: Spotify, me: dict, user_id: str, name: str): def __init__(
self,
session: OAuth2Session,
spotify: Spotify,
me: dict,
user_id: str,
name: str,
):
"""Initialize.""" """Initialize."""
self._id = user_id self._id = user_id
self._me = me self._me = me