@@ -71,7 +71,7 @@ def listdir(self, node_id: NodeID) -> list[Node]:
7171 return list (self .iterdir (node_id ))
7272
7373
74- @dataclasses .dataclass (slots = True , frozen = True , kw_only = True , weakref_slot = True )
74+ @dataclasses .dataclass (slots = True , frozen = True , kw_only = True , weakref_slot = True , repr = False )
7575class SimpleFileSystem (_NodeWalker , _DictDumper ):
7676 """A simple representation of Mega.nz's file system.
7777
@@ -90,7 +90,7 @@ def fields():
9090 for name , node in [("root" , self .root ), ("inbox" , self .inbox ), ("trash_bin" , self .trash_bin )]:
9191 yield name , node .id if node is not None else None
9292 yield "files" , self .file_count
93- yield "folders" , self .file_count
93+ yield "folders" , self .folder_count
9494
9595 all_fields = ", " .join (f"{ name } ={ value !r} " for name , value in fields ())
9696 return f"<{ type (self ).__name__ } ({ all_fields } )>"
@@ -174,7 +174,7 @@ def from_dump(cls, dump: dict[str, Any], /) -> Self:
174174 return cls .build (Node .from_dump (node ) for node in dump ["nodes" ].values ())
175175
176176
177- @dataclasses .dataclass (slots = True , frozen = True , kw_only = True , weakref_slot = True )
177+ @dataclasses .dataclass (slots = True , frozen = True , kw_only = True , weakref_slot = True , repr = False )
178178class FileSystem (SimpleFileSystem ):
179179 """Mega.nz's file system.
180180
@@ -184,13 +184,13 @@ class FileSystem(SimpleFileSystem):
184184 NOTE: Mega's filesystem is **not POSIX-compliant**: multiple nodes may have the same path
185185 """
186186
187- paths : MappingProxyType [NodeID , PurePosixPath ] = dataclasses . field ( repr = False )
187+ paths : MappingProxyType [NodeID , PurePosixPath ]
188188 """A mapping of every node to its absolute path within the filesystem"""
189189
190- inv_paths : MappingProxyType [PurePosixPath , tuple [NodeID , ...]] = dataclasses . field ( repr = False )
190+ inv_paths : MappingProxyType [PurePosixPath , tuple [NodeID , ...]]
191191 """A mapping of paths to every node located at that path"""
192192
193- _deleted : frozenset [NodeID ] = dataclasses . field ( repr = False )
193+ _deleted : frozenset [NodeID ]
194194
195195 @classmethod
196196 def build (cls , nodes : Iterable [Node ]) -> Self :
@@ -340,7 +340,7 @@ def dump(self, *, simple: bool = False) -> dict[str, Any]:
340340 )
341341
342342
343- @dataclasses .dataclass (slots = True , frozen = True , kw_only = True , weakref_slot = True )
343+ @dataclasses .dataclass (slots = True , frozen = True , kw_only = True , weakref_slot = True , repr = False )
344344class UserFileSystem (FileSystem ):
345345 root : Node
346346 inbox : Node
0 commit comments