Skip to content

Commit f5371ab

Browse files
authored
Merge pull request #62 from scaleapi/da/urls
Added google cloud storage prefix to local check and simplified
2 parents 2e515a4 + d142144 commit f5371ab

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

nucleus/dataset_item.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@ def from_json(cls, payload: dict):
3636

3737
def _is_local_path(self, path: str) -> bool:
3838
path_components = [comp.lower() for comp in path.split("/")]
39-
return not (
40-
"https:" in path_components
41-
or "http:" in path_components
42-
or "s3:" in path_components
43-
)
39+
return path_components[0] not in {"https:", "http:", "s3:", "gs:"}
4440

4541
def local_file_exists(self):
4642
return os.path.isfile(self.image_url)

0 commit comments

Comments
 (0)