From 53b5dcb406bf2641d6172cb90e800b9279c3e84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Fri, 29 Nov 2024 20:15:00 -0600 Subject: [PATCH] Make mypy happy --- singer_sdk/contrib/filesystem/tap.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/singer_sdk/contrib/filesystem/tap.py b/singer_sdk/contrib/filesystem/tap.py index 88b08ac34..ff0c98819 100644 --- a/singer_sdk/contrib/filesystem/tap.py +++ b/singer_sdk/contrib/filesystem/tap.py @@ -142,7 +142,7 @@ def read_mode(self) -> ReadMode: @functools.cached_property def path(self) -> str: """Return the path to the directory.""" - return self.config["path"] + return self.config["path"] # type: ignore[no-any-return] @functools.cached_property def fs(self) -> fsspec.AbstractFileSystem: @@ -159,8 +159,12 @@ def fs(self) -> fsspec.AbstractFileSystem: errors=[f"Missing configuration for filesystem {protocol}"], ) logger.info("Instantiating filesystem interface: '%s'", protocol) - fs = fsspec.filesystem(protocol, **self.config.get(protocol, {})) - return fsspec.implementations.dirfs.DirFileSystem(path=self.path, fs=fs) + + return fsspec.implementations.dirfs.DirFileSystem( + path=self.path, + target_protocol=protocol, + target_options=self.config.get(protocol), + ) def discover_streams(self) -> list: """Return a list of discovered streams.