Skip to content

Commit 64c7687

Browse files
author
Matt Sokoloff
committed
small changes
1 parent 6f94dd0 commit 64c7687

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

labelbox/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,5 @@ class UuidError(LabelboxError):
107107

108108

109109
class ValidationError(LabelboxError):
110-
"""Raised when an ndjson line is invalid."""
110+
"""Raised when user input is invalid for MAL imports."""
111111
...

labelbox/schema/bulk_import_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def create_from_objects(cls,
221221
client,
222222
project_id: str,
223223
name: str,
224-
predictions: Iterable[Dict[Any, Any]],
224+
predictions: Iterable[Dict],
225225
validate=True) -> 'BulkImportRequest':
226226
"""
227227
Creates a `BulkImportRequest` from an iterable of dictionaries.

labelbox/schema/project.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import logging
55
from pathlib import Path
66
import time
7-
from typing import Any, Dict, Union, Iterable
7+
from typing import Dict, List, Union, Iterable
88
from urllib.parse import urlparse
99

1010
from labelbox import utils
@@ -416,7 +416,7 @@ def enable_model_assisted_labeling(self, toggle: bool = True) -> bool:
416416
def upload_annotations(
417417
self,
418418
name: str,
419-
annotations: Union[str, Path, Iterable[Dict[Any, Any]]],
419+
annotations: Union[str, Path, Iterable[Dict]],
420420
validate: bool = True) -> 'BulkImportRequest': # type: ignore
421421
""" Uploads annotations to a new Editor project.
422422
@@ -467,12 +467,12 @@ def _is_url_valid(url: Union[str, Path]) -> bool:
467467
file=path,
468468
validate_file=validate,
469469
)
470-
elif isinstance(annotations, Iterable):
470+
elif isinstance(annotations, List):
471471
return BulkImportRequest.create_from_objects(
472472
client=self.client,
473473
project_id=self.uid,
474474
name=name,
475-
predictions=annotations,
475+
predictions=annotations, # type: ignore
476476
validate=validate)
477477
else:
478478
raise ValueError(

0 commit comments

Comments
 (0)