Skip to content

Commit

Permalink
q-dev: fix type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Oct 25, 2024
1 parent 4a16de5 commit ca949bb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions qubes/ext/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def interfaces(self) -> List[qubes.device_protocol.DeviceInterface]:
return [qubes.device_protocol.DeviceInterface("******", "block")]

@property
def parent_device(self) -> Optional[qubes.device_protocol.Port]:
def parent_device(self) -> Optional[qubes.device_protocol.DeviceInfo]:
"""
The parent device, if any.
Expand All @@ -192,9 +192,8 @@ def parent_device(self) -> Optional[qubes.device_protocol.Port]:
if not parent_ident:
return None
try:
self._parent = (self.backend_domain.devices)[devclass][
parent_ident
]
self._parent = self.backend_domain.devices[
devclass][parent_ident]
except KeyError:
self._parent = qubes.device_protocol.UnknownDevice(
qubes.device_protocol.Port(
Expand Down

0 comments on commit ca949bb

Please sign in to comment.