Skip to content

Commit 583efc5

Browse files
committed
format with black
1 parent bfd68c1 commit 583efc5

File tree

16 files changed

+374
-174
lines changed

16 files changed

+374
-174
lines changed

memobj/allocation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ class Allocation:
99
def __init__(self, address: int, process: "Process"):
1010
self.address = address
1111
self.process = process
12-
12+
1313
self._is_closed: bool = False
1414

1515
def __repr__(self) -> str:
1616
return f"<Allocation at {hex(self.address)}>"
1717

1818
def __enter__(self) -> Self:
1919
return self
20-
20+
2121
def __exit__(self, *_):
2222
self.free()
2323

@@ -38,7 +38,7 @@ class Allocator:
3838
with Allocator(process) as allocator:
3939
with allocator.allocate() as allocation:
4040
# do something with allocation
41-
41+
4242
allocation = allocator.allocate()
4343
"""
4444

@@ -52,7 +52,7 @@ def __enter__(self) -> Self:
5252
if self._is_closed:
5353
raise ValueError("Cannot reuse a closed allocator")
5454
return self
55-
55+
5656
def __exit__(self, *_):
5757
self.close()
5858

@@ -69,7 +69,7 @@ def allocate(self, size: int) -> Allocation:
6969
def close(self):
7070
if self._is_closed:
7171
raise ValueError("Cannot close an already closed allocator")
72-
72+
7373
for allocation in self.allocations:
7474
if not allocation.closed:
7575
allocation.free()

0 commit comments

Comments
 (0)