diff --git a/swh/fuse/fs/artifact.py b/swh/fuse/fs/artifact.py --- a/swh/fuse/fs/artifact.py +++ b/swh/fuse/fs/artifact.py @@ -30,10 +30,6 @@ class Content(FuseFileEntry): """ Software Heritage content artifact. - Attributes: - swhid: Software Heritage persistent identifier - prefetch: optional prefetched metadata used to set entry attributes - Content leaves (AKA blobs) are represented on disks as regular files, containing the corresponding bytes, as archived. @@ -44,6 +40,7 @@ swhid: CoreSWHID prefetch: Any = None + """optional prefetched metadata used to set entry attributes""" async def get_content(self) -> bytes: data = await self.fuse.get_blob(self.swhid) @@ -62,9 +59,6 @@ class Directory(FuseDirEntry): """ Software Heritage directory artifact. - Attributes: - swhid: Software Heritage persistent identifier - Directory nodes are represented as directories on the file-system, containing one entry for each entry of the archived directory. Entry names and other metadata, including permissions, will correspond to the archived @@ -139,9 +133,6 @@ class Revision(FuseDirEntry): """ Software Heritage revision artifact. - Attributes: - swhid: Software Heritage persistent identifier - Revision (AKA commit) nodes are represented on the file-system as directories with the following entries: @@ -432,9 +423,6 @@ class Release(FuseDirEntry): """ Software Heritage release artifact. - Attributes: - swhid: Software Heritage persistent identifier - Release nodes are represented on the file-system as directories with the following entries: @@ -504,9 +492,6 @@ class Snapshot(FuseDirEntry): """ Software Heritage snapshot artifact. - Attributes: - swhid: Software Heritage persistent identifier - Snapshot nodes are represented on the file-system as recursive directories following the branch names structure. For example, a branch named ``refs/tags/v1.0`` will be represented as a ``refs`` directory containing a diff --git a/swh/fuse/fs/entry.py b/swh/fuse/fs/entry.py --- a/swh/fuse/fs/entry.py +++ b/swh/fuse/fs/entry.py @@ -36,19 +36,17 @@ @dataclass class FuseEntry: """ Main wrapper class to manipulate virtual FUSE entries - - Attributes: - name: entry filename - mode: entry permission mode - fuse: internal reference to the main FUSE class - inode: unique integer identifying the entry """ name: str + """entry filename""" mode: int + """entry permission mode""" depth: int fuse: Fuse + """internal reference to the main FUSE class""" inode: int = field(init=False) + """unique integer identifying the entry""" file_info_attrs: Dict[str, Any] = field(init=False, default_factory=dict) def __post_init__(self): @@ -134,13 +132,11 @@ @dataclass class FuseSymlinkEntry(FuseEntry): """ FUSE virtual symlink entry - - Attributes: - target: path to symlink target """ mode: int = field(init=False, default=int(EntryMode.RDONLY_LNK)) target: Union[str, bytes, Path] + """path to symlink target""" async def size(self) -> int: return len(str(self.target))