]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: fix type annotation for list containing IP addresses
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 29 Mar 2023 14:14:33 +0000 (10:14 -0400)
committerAfreen <afreen23.git@gmail.com>
Thu, 15 Feb 2024 08:28:43 +0000 (13:58 +0530)
This change makes this file pass mypy checking on mypy 0.981.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 84a02d63ef1fc8bc4cc3d6c7fc4579c8448a9e4a)

src/cephadm/cephadm

index a047c30549fb70092790f3f986d0b987cfa7537e..0e769043ab6dbb27c1d054551826eb2427add2cd 100755 (executable)
@@ -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])