From 84a02d63ef1fc8bc4cc3d6c7fc4579c8448a9e4a Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 29 Mar 2023 10:14:33 -0400 Subject: [PATCH] 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 --- src/cephadm/cephadm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index b69f7c40cae60..42c32285fcfc4 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]) -- 2.39.5