From: John Mulligan Date: Wed, 29 Mar 2023 14:14:33 +0000 (-0400) Subject: cephadm: fix type annotation for list containing IP addresses X-Git-Tag: v17.2.8~507^2~9 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=95452921618d3c3d9b5921ad8e16c16fc296070c;p=ceph.git cephadm: fix type annotation for list containing IP addresses This change makes this file pass mypy checking on mypy 0.981. Signed-off-by: John Mulligan (cherry picked from commit 84a02d63ef1fc8bc4cc3d6c7fc4579c8448a9e4a) --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index a047c30549fb7..0e769043ab6db 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -4931,7 +4931,7 @@ def infer_mon_network(ctx: CephadmContext, mon_eps: List[EndPoint]) -> Optional[ mon_networks = [] for net, ifaces in list_networks(ctx).items(): # build local_ips list for the specified network - local_ips: List[str] = [] + local_ips: List[Union[ipaddress.IPv4Address, ipaddress.IPv6Address]] = [] for _, ls in ifaces.items(): local_ips.extend([ipaddress.ip_address(ip) for ip in ls])