From 14d6d40aa4548c7f891f657aede235b1dfa0db0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Fri, 29 Nov 2024 19:16:25 -0600 Subject: [PATCH] Use details --- singer_sdk/contrib/filesystem/tap.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/singer_sdk/contrib/filesystem/tap.py b/singer_sdk/contrib/filesystem/tap.py index cce52f409..8584a6ca8 100644 --- a/singer_sdk/contrib/filesystem/tap.py +++ b/singer_sdk/contrib/filesystem/tap.py @@ -174,12 +174,12 @@ def discover_streams(self) -> list: return [ self.default_stream_class( tap=self, - name=file_path_to_stream_name(member), - filepaths=[os.path.join(path, member)], # noqa: PTH118 + name=file_path_to_stream_name(member["name"]), + filepaths=[os.path.join(path, member["name"])], # noqa: PTH118 filesystem=self.fs, ) - for member in self.fs.listdir(path, detail=False) - if member.endswith(self.valid_extensions) + for member in self.fs.listdir(path) + if member["name"].endswith(self.valid_extensions) ] # Merge @@ -188,9 +188,9 @@ def discover_streams(self) -> list: tap=self, name=self.config["stream_name"], filepaths=[ - os.path.join(path, member) # noqa: PTH118 - for member in self.fs.listdir(path, detail=False) - if member.endswith(self.valid_extensions) + os.path.join(path, member["name"]) # noqa: PTH118 + for member in self.fs.listdir(path) + if member["name"].endswith(self.valid_extensions) ], filesystem=self.fs, )