Skip to content

Commit 3c39c8b

Browse files
fix(pre_commit): 🎨 auto format pre-commit hooks
1 parent 81f155d commit 3c39c8b

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

roboflow/adapters/deploymentapi.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import requests
21
import urllib
2+
3+
import requests
4+
35
from roboflow.config import DEDICATED_DEPLOYMENT_URL
46

57

@@ -58,13 +60,13 @@ def list_machine_types(api_key):
5860

5961

6062
def get_deployment_log(api_key, deployment_name, from_timestamp=None, to_timestamp=None, max_entries=-1):
61-
params = {'api_key': api_key, 'deployment_name': deployment_name}
63+
params = {"api_key": api_key, "deployment_name": deployment_name}
6264
if from_timestamp is not None:
63-
params['from_timestamp'] = from_timestamp.isoformat() # may contain + sign
65+
params["from_timestamp"] = from_timestamp.isoformat() # may contain + sign
6466
if to_timestamp is not None:
65-
params['to_timestamp'] = to_timestamp.isoformat() # may contain + sign
67+
params["to_timestamp"] = to_timestamp.isoformat() # may contain + sign
6668
if max_entries > 0:
67-
params['max_entries'] = max_entries
69+
params["max_entries"] = max_entries
6870
url = f"{DEDICATED_DEPLOYMENT_URL}/get_log?{urllib.parse.urlencode(params)}"
6971
response = requests.get(url)
7072
if response.status_code != 200:

roboflow/deployment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def get_deployment_log(args):
169169
print("Please provide an api key")
170170
exit(1)
171171

172-
to_timestamp = datetime.now().astimezone() # local timezone
172+
to_timestamp = datetime.now().astimezone() # local timezone
173173
from_timestamp = to_timestamp - timedelta(seconds=args.duration)
174174
last_log_timestamp = from_timestamp
175175
log_ids = set() # to avoid duplicate logs
@@ -195,5 +195,5 @@ def get_deployment_log(args):
195195

196196
time.sleep(10)
197197
from_timestamp = last_log_timestamp
198-
to_timestamp = datetime.now().astimezone() # local timezone
198+
to_timestamp = datetime.now().astimezone() # local timezone
199199
max_entries = 300 # only set max_entries for the first request

0 commit comments

Comments
 (0)