MCPcopy Create free account
hub / github.com/comaps/comaps / __len__

Method __len__

tools/python/mwm/mwm_python.py:53–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 return self.tags
52
53 def __len__(self) -> int:
54 old_pos = self.file.tell()
55 pos, end = self._get_features_offset_and_size()
56 size = 0
57 while pos < end:
58 self.file.seek(pos)
59 feature_size = read_varuint(self.file)
60 pos = self.file.tell() + feature_size
61 size += 1
62 self.file.seek(old_pos)
63 return size
64
65 def __iter__(self) -> Iterable:
66 return MwmPythonIter(self)

Callers

nothing calls this directly

Calls 2

read_varuintFunction · 0.85

Tested by

no test coverage detected