Skip to content

Commit 660819a

Browse files
author
Kevin Kim
committed
Removing validators and code changes to dataset.py
1 parent 037c4e5 commit 660819a

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

labelbox/schema/dataset.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,11 @@ def export_data_rows(self, timeout_seconds=120) -> Generator:
430430
response = requests.get(download_url)
431431
response.raise_for_status()
432432
reader = ndjson.reader(StringIO(response.text))
433-
for r in reader:
434-
print(f"Reader: {r}")
433+
435434
# TODO: Update result to parse metadataFields when resolver returns
436-
return (
437-
Entity.DataRow(self.client, result) for result in reader)
435+
return (Entity.DataRow(self.client, {
436+
**result, 'metadataFields': []
437+
}) for result in reader)
438438
elif res["status"] == "FAILED":
439439
raise LabelboxError("Data row export failed.")
440440

labelbox/schema/task.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ def get_result(self) -> str:
7474
""" Downloads the result file from Task
7575
"""
7676
if self.result:
77-
result_url = validators.url(self.result)
78-
if isinstance(result_url, ValidationFailure):
79-
raise TypeError(f"{result_url} is not a valid url")
8077
response = requests.get(self.result)
8178
response.raise_for_status()
8279
return response.text

mypy.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,4 @@ ignore_missing_imports = True
1111
ignore_errors = True
1212

1313
[mypy-labelbox]
14-
ignore_errors = True
15-
16-
[mypy-validators]
1714
ignore_errors = True

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ typeguard
1313
imagesize
1414
pyproj
1515
pygeotile
16-
typing-extensions
17-
validators
16+
typing-extensions

0 commit comments

Comments
 (0)