Skip to content

Commit 6f94dd0

Browse files
author
Matt Sokoloff
committed
reccomended changes
1 parent 31cdf6a commit 6f94dd0

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

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],
224+
predictions: Iterable[Dict[Any, Any]],
225225
validate=True) -> 'BulkImportRequest':
226226
"""
227227
Creates a `BulkImportRequest` from an iterable of dictionaries.

labelbox/schema/project.py

Lines changed: 3 additions & 3 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 Union, Iterable
7+
from typing import Any, Dict, 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]],
419+
annotations: Union[str, Path, Iterable[Dict[Any, Any]]],
420420
validate: bool = True) -> 'BulkImportRequest': # type: ignore
421421
""" Uploads annotations to a new Editor project.
422422
@@ -472,7 +472,7 @@ def _is_url_valid(url: Union[str, Path]) -> bool:
472472
client=self.client,
473473
project_id=self.uid,
474474
name=name,
475-
predictions=annotations, # type: ignore
475+
predictions=annotations,
476476
validate=validate)
477477
else:
478478
raise ValueError(

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ requests==2.22.0
22
ndjson==0.3.1
33
backoff==1.10.0
44
google-api-core>=1.22.1
5+
pydantic==1.8

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"backoff==1.10.0",
2424
"backports-datetime-fromisoformat==1.0.0; python_version < '3.7.0'",
2525
"dataclasses==0.7; python_version < '3.7.0'", "ndjson==0.3.1",
26-
"requests>=2.22.0", "google-api-core>=1.22.1", "pydantic"
26+
"requests>=2.22.0", "google-api-core>=1.22.1", "pydantic==1.8"
2727
],
2828
classifiers=[
2929
'Development Status :: 3 - Alpha',

0 commit comments

Comments
 (0)