Skip to content

Commit 81272f2

Browse files
committed
formatting
1 parent 3f10703 commit 81272f2

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

mp_reader/malloc_stats.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class OutputObjectInfo:
102102
def depth(self) -> int:
103103
return len(self.type_data)
104104

105-
def reverse(self) -> 'OutputObjectInfo':
105+
def reverse(self) -> "OutputObjectInfo":
106106
"""Return a new OutputObjectInfo which reverses the order of all entries
107107
in the OutputObjectInfo.
108108
@@ -168,15 +168,16 @@ class OutputTypeData:
168168

169169
def field_slice(self, i: int) -> slice:
170170
"""Return the fields corresponding to the given index into the type data table"""
171-
return slice(self.field_off[i], self.field_off[i+1])
171+
return slice(self.field_off[i], self.field_off[i + 1])
172172

173173
def base_slice(self, i: int) -> slice:
174174
"""Return the bases corresponding to the given index into the type data table"""
175-
return slice(self.base_off[i], self.base_off[i+1])
175+
return slice(self.base_off[i], self.base_off[i + 1])
176176

177177
def num_entries(self) -> int:
178178
return len(self.size)
179179

180+
180181
@dataclass
181182
class TypeData:
182183
size: int
@@ -211,6 +212,7 @@ def get_offset(parent_range: range, addr: int) -> addr_t | None:
211212
else:
212213
return None
213214

215+
214216
@dataclass
215217
class OutputEvent:
216218
"""
@@ -249,7 +251,13 @@ def expand_objects(self, ctx: "OutputRecord") -> list[ObjectEnt | None]:
249251
reversed(object_info.size),
250252
reversed(object_info.type),
251253
):
252-
entries[i] = ObjectEnt(object_id, addr, size, get_offset(parent_range, addr), ctx.strtab[type])
254+
entries[i] = ObjectEnt(
255+
object_id,
256+
addr,
257+
size,
258+
get_offset(parent_range, addr),
259+
ctx.strtab[type],
260+
)
253261
parent_range = range(addr, addr + size)
254262
return entries
255263

0 commit comments

Comments
 (0)