Skip to content

Commit e6e0cfe

Browse files
author
Matt Sokoloff
committed
yapf
1 parent 7a52813 commit e6e0cfe

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

labelbox/schema/project.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,10 @@ def enable_model_assisted_labeling(self, toggle: bool = True) -> bool:
414414
"showingPredictionsToLabelers"]
415415

416416
def upload_annotations(
417-
self,
418-
name: str,
419-
annotations: Union[str, Union[str, Path], Iterable[dict]],
420-
validate = True
421-
) -> 'BulkImportRequest': # type: ignore
417+
self,
418+
name: str,
419+
annotations: Union[str, Union[str, Path], Iterable[dict]],
420+
validate=True) -> 'BulkImportRequest': # type: ignore
422421
""" Uploads annotations to a new Editor project.
423422
424423
Args:
@@ -450,13 +449,11 @@ def _is_url_valid(url: Union[str, Path]) -> bool:
450449
return bool(parsed.scheme) and bool(parsed.netloc)
451450

452451
if _is_url_valid(annotations):
453-
return BulkImportRequest.create_from_url(
454-
client=self.client,
455-
project_id=self.uid,
456-
name=name,
457-
url=str(annotations),
458-
validate = validate
459-
)
452+
return BulkImportRequest.create_from_url(client=self.client,
453+
project_id=self.uid,
454+
name=name,
455+
url=str(annotations),
456+
validate=validate)
460457
else:
461458
path = Path(annotations)
462459
if not path.exists():
@@ -476,12 +473,12 @@ def _is_url_valid(url: Union[str, Path]) -> bool:
476473
project_id=self.uid,
477474
name=name,
478475
predictions=annotations, # type: ignore
479-
validate = validate
480-
)
476+
validate=validate)
481477
else:
482478
raise ValueError(
483479
f'Invalid annotations given of type: {type(annotations)}')
484480

481+
485482
class LabelingParameterOverride(DbObject):
486483
""" Customizes the order of assets in the label queue.
487484

setup.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@
2222
install_requires=[
2323
"backoff==1.10.0",
2424
"backports-datetime-fromisoformat==1.0.0; python_version < '3.7.0'",
25-
"dataclasses==0.7; python_version < '3.7.0'",
26-
"ndjson==0.3.1",
27-
"requests>=2.22.0",
28-
"google-api-core>=1.22.1",
29-
"pydantic"
25+
"dataclasses==0.7; python_version < '3.7.0'", "ndjson==0.3.1",
26+
"requests>=2.22.0", "google-api-core>=1.22.1", "pydantic"
3027
],
3128
classifiers=[
3229
'Development Status :: 3 - Alpha',

0 commit comments

Comments
 (0)