Skip to content

Commit

Permalink
Fix errors found by pylint 3.2.7 (#946)
Browse files Browse the repository at this point in the history
* Fix errors found by pylint 3.2.7

* Move assignment of data out of else-block
  • Loading branch information
emontnemery authored Sep 4, 2024
1 parent 93c7350 commit 12f7e64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pychromecast/controllers/plex.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def media_to_chromecast_command( # pylint: disable=invalid-name, too-many-local
dict: Returs a dict formatted correctly to start playback on a Chromecast.
"""

machineIdentifier = None
token = None
if media is not None:
# Lets set some params for the user if they use plexapi.
server: PlexServer = (
Expand Down
3 changes: 1 addition & 2 deletions pychromecast/socket_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,6 @@ def _run_once(self) -> int:
self.port,
exc,
)
else:
data = _dict_from_message_payload(message)

if self.wakeup_selector_key in can_read:
# Clear the socket's buffer
Expand All @@ -633,6 +631,7 @@ def _run_once(self) -> int:
return 0

# See if any handlers will accept this message
data = _dict_from_message_payload(message)
self._route_message(message, data)

if REQUEST_ID in data and data[REQUEST_ID] in self._request_callbacks:
Expand Down

0 comments on commit 12f7e64

Please sign in to comment.