From b50952ee8b2eb7bdc77c5bbc65a04243032545f6 Mon Sep 17 00:00:00 2001 From: Sigurd Spieckermann <2206639+sisp@users.noreply.github.com> Date: Wed, 3 Aug 2022 23:11:28 +0200 Subject: [PATCH 1/3] fs: http: fix `isfile` method --- src/dvc_objects/fs/implementations/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dvc_objects/fs/implementations/http.py b/src/dvc_objects/fs/implementations/http.py index 27980f2d..77b1b7b4 100644 --- a/src/dvc_objects/fs/implementations/http.py +++ b/src/dvc_objects/fs/implementations/http.py @@ -155,7 +155,7 @@ def isdir(self, *args, **kwargs): return False def isfile(self, *args, **kwargs): - return True + return self.fs.exists(*args, **kwargs) def ls(self, *args, **kwargs): raise NotImplementedError From 79ed427c176d1688acee2a468ecce83beee81a2b Mon Sep 17 00:00:00 2001 From: Sigurd Spieckermann <2206639+sisp@users.noreply.github.com> Date: Wed, 3 Aug 2022 23:36:00 +0200 Subject: [PATCH 2/3] fs: http: delegate to `fs.isfile` instead of `fs.exists` --- src/dvc_objects/fs/implementations/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dvc_objects/fs/implementations/http.py b/src/dvc_objects/fs/implementations/http.py index 77b1b7b4..92b52af4 100644 --- a/src/dvc_objects/fs/implementations/http.py +++ b/src/dvc_objects/fs/implementations/http.py @@ -155,7 +155,7 @@ def isdir(self, *args, **kwargs): return False def isfile(self, *args, **kwargs): - return self.fs.exists(*args, **kwargs) + return self.fs.isfile(*args, **kwargs) def ls(self, *args, **kwargs): raise NotImplementedError From b314c2c7323007e7b24bbf38f7171aeb9f3719a9 Mon Sep 17 00:00:00 2001 From: Sigurd Spieckermann <2206639+sisp@users.noreply.github.com> Date: Thu, 4 Aug 2022 09:56:40 +0200 Subject: [PATCH 3/3] fs: http: remove `isfile` method `isfile` is implemented already in the base class. --- src/dvc_objects/fs/implementations/http.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/dvc_objects/fs/implementations/http.py b/src/dvc_objects/fs/implementations/http.py index 92b52af4..d2c78212 100644 --- a/src/dvc_objects/fs/implementations/http.py +++ b/src/dvc_objects/fs/implementations/http.py @@ -154,9 +154,6 @@ def find(self, *args, **kwargs): def isdir(self, *args, **kwargs): return False - def isfile(self, *args, **kwargs): - return self.fs.isfile(*args, **kwargs) - def ls(self, *args, **kwargs): raise NotImplementedError