Skip to content

Commit ca949bb

Browse files
committed
q-dev: fix type hint
1 parent 4a16de5 commit ca949bb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

qubes/ext/block.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def interfaces(self) -> List[qubes.device_protocol.DeviceInterface]:
168168
return [qubes.device_protocol.DeviceInterface("******", "block")]
169169

170170
@property
171-
def parent_device(self) -> Optional[qubes.device_protocol.Port]:
171+
def parent_device(self) -> Optional[qubes.device_protocol.DeviceInfo]:
172172
"""
173173
The parent device, if any.
174174
@@ -192,9 +192,8 @@ def parent_device(self) -> Optional[qubes.device_protocol.Port]:
192192
if not parent_ident:
193193
return None
194194
try:
195-
self._parent = (self.backend_domain.devices)[devclass][
196-
parent_ident
197-
]
195+
self._parent = self.backend_domain.devices[
196+
devclass][parent_ident]
198197
except KeyError:
199198
self._parent = qubes.device_protocol.UnknownDevice(
200199
qubes.device_protocol.Port(

0 commit comments

Comments
 (0)