Skip to content

Commit a05c314

Browse files
authored
Merge pull request #1258 from gboutry/fix/machine-addresses-hint
#1258 #### Description Having `list[str]` has type-hinting made working with a type-checker awkward as an addresses is defined as a dict of mostly [str, str] key-values pairs, with one key-value being a [str, boolean] key-value pairs. #### QA Steps Just a type hint change #### Notes & Discussion I chose not to type as `typing.List[typing.Dict[str, typing.Union[str, boolean]]]` as it would make working with that type also awkward... https://github.com/juju/python-libjuju/blob/fdbbbe9ccbbeb596fc500fdf6225ea937856f507/juju/client/schemas-juju-3.6.0.json#L10586
2 parents fdbbbe9 + 263c2d6 commit a05c314

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

juju/machine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ async def ssh(
227227
return stdout.decode()
228228

229229
@property
230-
def addresses(self) -> typing.List[str]:
230+
def addresses(self) -> typing.List[dict]:
231231
"""Returns the machine addresses."""
232232
return self.safe_data["addresses"] or []
233233

0 commit comments

Comments
 (0)