Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
maddiedawson committed May 23, 2023
1 parent 69bd78f commit 1728baf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/datasets/filesystems/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import importlib
import os
import shutil
import threading
from typing import List

import fsspec
import fsspec.asyn
import psutil

from . import compression
from .fusefilesystem import FuseFileSystem
from .hffilesystem import HfFileSystem


Expand Down
10 changes: 5 additions & 5 deletions src/datasets/filesystems/fusefilesystem.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import fsspec
from fsspec.implementations.local import LocalFileSystem


class FuseFileSystem(fsspec.LocalFileSystem):
class FuseFileSystem(LocalFileSystem):
"""
`datasets.filesystems.FuseFileSystem` is a subclass of [`fsspec.LocalFileSystem`](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.implementations.local.LocalFileSystem).
`datasets.filesystems.FuseFileSystem` is a subclass of `fsspec`'s [`LocalFileSystem`](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.implementations.local.LocalFileSystem).
Users can use this class to access FUSE-mounted files. The `datasets` library treats this class as a remote file
system to make file moving and renaming more efficient.
"""


def create_fuse_file_system(fs: fsspec.LocalFileSystem):
"""Creates a FuseFileSystem by copying over attributes from an fsspec.LocalFileSystem."""
def create_fuse_file_system(fs: LocalFileSystem):
"""Creates a FuseFileSystem by copying over attributes from an `LocalFileSystem`."""
fuse_fs = FuseFileSystem()
fuse_fs.__dict__.update(fs.__dict__)

0 comments on commit 1728baf

Please sign in to comment.