Skip to content

Commit db8d0b8

Browse files
committed
Bumped version number, ran black on changed file
1 parent f638619 commit db8d0b8

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

roboflow/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from roboflow.core.project import Project
99
from roboflow.core.workspace import Workspace
1010

11-
__version__ = "0.2.29"
11+
__version__ = "0.2.30"
1212

1313

1414
def check_key(api_key, model, notebook, num_retries=0):

roboflow/core/project.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ def versions(self):
9999
return version_array
100100

101101
def generate_version(self, settings):
102-
103102
"""
104103
Settings, a python dict with augmentation and preprocessing keys and specifications for generation.
105104
These settings mirror capabilities available via the Roboflow UI.
@@ -239,7 +238,6 @@ def version(self, version_number, local=None):
239238
version_info = self.get_version_information()
240239

241240
for version_object in version_info:
242-
243241
current_version_num = os.path.basename(version_object["id"])
244242
if current_version_num == str(version_number):
245243
vers = Version(
@@ -258,16 +256,14 @@ def version(self, version_number, local=None):
258256

259257
raise RuntimeError("Version number {} is not found.".format(version_number))
260258

261-
262259
def __image_upload(
263260
self,
264261
image_path,
265262
hosted_image=False,
266263
split="train",
267264
batch_name=DEFAULT_BATCH_NAME,
268-
**kwargs
265+
**kwargs,
269266
):
270-
271267
"""function to upload image to the specific project
272268
:param image_path: path to image you'd like to upload.
273269
:param hosted_image: if the image is hosted online, then this should be modified
@@ -311,11 +307,12 @@ def __image_upload(
311307

312308
# Build multipart form and post request
313309
m = MultipartEncoder(
314-
fields = {
310+
fields={
315311
"name": image_name,
316312
"split": split,
317313
"file": ("imageToUpload", buffered.getvalue(), "image/jpeg"),
318-
})
314+
}
315+
)
319316
response = requests.post(
320317
self.image_upload_url, data=m, headers={"Content-Type": m.content_type}
321318
)
@@ -386,9 +383,8 @@ def upload(
386383
split="train",
387384
num_retry_uploads=0,
388385
batch_name=DEFAULT_BATCH_NAME,
389-
**kwargs
386+
**kwargs,
390387
):
391-
392388
"""upload function
393389
:param image_path: path to image you'd like to upload
394390
:param annotation_path: if you're upload annotation, path to it
@@ -429,7 +425,7 @@ def upload(
429425
split=split,
430426
num_retry_uploads=num_retry_uploads,
431427
batch_name=batch_name,
432-
**kwargs
428+
**kwargs,
433429
)
434430
else:
435431
images = os.listdir(image_path)
@@ -444,7 +440,7 @@ def upload(
444440
split=split,
445441
num_retry_uploads=num_retry_uploads,
446442
batch_name=batch_name,
447-
**kwargs
443+
**kwargs,
448444
)
449445
print("[ " + path + " ] was uploaded succesfully.")
450446
else:
@@ -460,9 +456,8 @@ def single_upload(
460456
split="train",
461457
num_retry_uploads=0,
462458
batch_name=DEFAULT_BATCH_NAME,
463-
**kwargs
459+
**kwargs,
464460
):
465-
466461
success = False
467462
annotation_success = False
468463
# User gives image path
@@ -473,7 +468,7 @@ def single_upload(
473468
hosted_image=hosted_image,
474469
split=split,
475470
batch_name=batch_name,
476-
**kwargs
471+
**kwargs,
477472
)
478473
# Get JSON response values
479474
try:
@@ -513,7 +508,7 @@ def single_upload(
513508
image_id=image_id,
514509
split=split,
515510
num_retry_uploads=num_retry_uploads - 1,
516-
**kwargs
511+
**kwargs,
517512
)
518513
return
519514
else:

0 commit comments

Comments
 (0)