Skip to content

Commit

Permalink
Format using black
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomezve committed Dec 17, 2024
1 parent 3959db2 commit 8c195b0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions extensions/eda/plugins/event_source/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
refresh_timeout: 60
"""

import asyncio
import json
import os
Expand All @@ -30,6 +31,7 @@
import requests
import websockets
import urllib3

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)


Expand All @@ -53,7 +55,9 @@ def login(hostname: str, username: str, password: str) -> str:
return token


def subscribe(hostname: str, token: str, rf_timeout: int, sub_urls: list[str]) -> list[str]:
def subscribe(
hostname: str, token: str, rf_timeout: int, sub_urls: list[str]
) -> list[str]:
"""
subscribe to a websocket
Expand All @@ -77,7 +81,9 @@ def subscribe(hostname: str, token: str, rf_timeout: int, sub_urls: list[str]) -
return sub_ids


async def refresh(hostname: str, token: str, refresh_timeout: int, sub_ids: list[str]) -> NoReturn:
async def refresh(
hostname: str, token: str, refresh_timeout: int, sub_ids: list[str]
) -> NoReturn:
"""
refresh subscriptions
Expand Down Expand Up @@ -151,4 +157,4 @@ async def put(self, item):
],
"refresh_timeout": 30,
}
asyncio.run(main(MockQueue(), mock_arguments))
asyncio.run(main(MockQueue(), mock_arguments))

0 comments on commit 8c195b0

Please sign in to comment.