Skip to content

Commit

Permalink
Fix typing: Missing return types on methods
Browse files Browse the repository at this point in the history
  • Loading branch information
hoh committed Apr 9, 2024
1 parent 07c34f9 commit c2b540c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/aleph/vm/hypervisors/firecracker/microvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,18 @@ def namespace_path(self) -> str:
return str(self.jailer_base_directory / firecracker_bin_name / str(self.vm_id))

@property
def jailer_path(self):
def jailer_path(self) -> str:
return os.path.join(self.namespace_path, "root")

@property
def socket_path(self):
def socket_path(self) -> str:
if self.use_jailer:
return f"{self.jailer_path}/run/firecracker.socket"
else:
return f"/tmp/firecracker-{self.vm_id}.socket"

@property
def vsock_path(self):
def vsock_path(self) -> str:
if self.use_jailer:
return f"{self.jailer_path}{VSOCK_PATH}"
else:
Expand All @@ -140,17 +140,17 @@ def __init__(
self.runtime_config = None
self.log_queues: list[asyncio.Queue] = []

def to_dict(self):
def to_dict(self) -> dict:
return {
"jailer_path": self.jailer_path,
"socket_path": self.socket_path,
"vsock_path": self.vsock_path,
**self.__dict__,
}

def prepare_jailer(self):
def prepare_jailer(self) -> None:
if not self.use_jailer:
return False
return
system(f"rm -fr {self.jailer_path}")

# system(f"rm -fr {self.jailer_path}/run/")
Expand Down

0 comments on commit c2b540c

Please sign in to comment.