From 95452921618d3c3d9b5921ad8e16c16fc296070c 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 (cherry picked from commit 84a02d63ef1fc8bc4cc3d6c7fc4579c8448a9e4a) --- src/cephadm/cephadm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]) -- 2.39.5