Skip to content

Commit

Permalink
Make mypy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Nov 30, 2024
1 parent edbd7e0 commit 53b5dcb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions singer_sdk/contrib/filesystem/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down

0 comments on commit 53b5dcb

Please sign in to comment.