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: v19.0.0~1447^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=84a02d63ef1fc8bc4cc3d6c7fc4579c8448a9e4a;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 --- diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index b69f7c40cae6..42c32285fcfc 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -5111,7 +5111,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])