Skip to content

Commit adf5ac8

Browse files
author
Ubuntu
committed
Sort imports
1 parent 14c59da commit adf5ac8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

nucleus/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import json
88
import logging
99
import os
10+
import time
1011
from typing import Any, Dict, List, Optional, Union
1112

1213
import aiohttp
@@ -15,7 +16,6 @@
1516
import requests
1617
import tqdm
1718
import tqdm.notebook as tqdm_notebook
18-
import time
1919

2020
from nucleus.url_utils import sanitize_string_args
2121

@@ -40,15 +40,15 @@
4040
ERROR_ITEMS,
4141
ERROR_PAYLOAD,
4242
ERRORS_KEY,
43-
JOB_ID_KEY,
44-
JOB_LAST_KNOWN_STATUS_KEY,
45-
JOB_TYPE_KEY,
46-
JOB_CREATION_TIME_KEY,
4743
IMAGE_KEY,
4844
IMAGE_URL_KEY,
4945
INDEX_CONTINUOUS_ENABLE_KEY,
5046
ITEM_METADATA_SCHEMA_KEY,
5147
ITEMS_KEY,
48+
JOB_CREATION_TIME_KEY,
49+
JOB_ID_KEY,
50+
JOB_LAST_KNOWN_STATUS_KEY,
51+
JOB_TYPE_KEY,
5252
KEEP_HISTORY_KEY,
5353
MESSAGE_KEY,
5454
MODEL_RUN_ID_KEY,
@@ -62,7 +62,7 @@
6262
UPDATE_KEY,
6363
)
6464
from .dataset import Dataset
65-
from .dataset_item import DatasetItem, CameraParams, Quaternion
65+
from .dataset_item import CameraParams, DatasetItem, Quaternion
6666
from .errors import (
6767
DatasetItemRetrievalError,
6868
ModelCreationError,
@@ -86,9 +86,9 @@
8686
PolygonPrediction,
8787
SegmentationPrediction,
8888
)
89+
from .scene import Frame, LidarScene
8990
from .slice import Slice
9091
from .upload_response import UploadResponse
91-
from .scene import Frame, LidarScene
9292

9393
# pylint: disable=E1101
9494
# TODO: refactor to reduce this file to under 1000 lines.
@@ -515,7 +515,7 @@ async def _make_files_request(
515515
content_type=file[1][2],
516516
)
517517

518-
for sleep_time in RetryStrategy.sleep_times + [""]:
518+
for sleep_time in RetryStrategy.sleep_times + [-1]:
519519
async with session.post(
520520
endpoint,
521521
data=form,
@@ -533,7 +533,7 @@ async def _make_files_request(
533533
data = await response.text()
534534
if (
535535
response.status in RetryStrategy.statuses
536-
and sleep_time != ""
536+
and sleep_time != -1
537537
):
538538
time.sleep(sleep_time)
539539
continue

0 commit comments

Comments
 (0)