Skip to content

Commit

Permalink
Some more linting
Browse files Browse the repository at this point in the history
Pour faire changement
  • Loading branch information
ic-dev21 committed Dec 2, 2024
1 parent cc86936 commit 83c3ad6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pyhilo/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def add_disconnect_callback(
return self._add_callback(self._disconnect_callbacks, callback)

def add_event_callback(self, callback: Callable[..., Any]) -> Callable[..., None]:
"""Add a callback callback to be called upon receiving an event.
"""Add a callback to be called upon receiving an event.
Note that callbacks should expect to receive a WebsocketEvent object as a
parameter.
:param callback: The method to call after receiving an event.
Expand Down Expand Up @@ -421,8 +421,7 @@ def __init__(
self.async_request = async_request
self._state_yaml = state_yaml
self._set_state = set_state_callback
self._shared_token = None

self._shared_token: Optional[str] = None
# Initialize websocket configurations, more can be added here
self.devicehub = WebsocketConfig(
endpoint=AUTOMATION_DEVICEHUB_ENDPOINT, session=session
Expand All @@ -442,7 +441,6 @@ async def refresh_token(
self, config: WebsocketConfig, get_new_token: bool = True
) -> None:
"""Refresh token for a specific websocket configuration.
Args:
config: The websocket configuration to refresh
"""
Expand All @@ -457,10 +455,8 @@ async def refresh_token(

async def _negotiate(self, config: WebsocketConfig) -> Tuple[str, str]:
"""Negotiate websocket connection and get URL and token.
Args:
config: The websocket configuration to negotiate
Returns:
Tuple containing the websocket URL and access token
"""
Expand Down

0 comments on commit 83c3ad6

Please sign in to comment.