]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerAdam King <adking@redhat.com>
Tue, 25 Apr 2023 12:36:55 +0000 (08:36 -0400)
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.py

index 6a17ea6f1500a72003b278fb34cf924c912cf7e3..2ed41a24df05a845d5c4f7295d17dc1895b7a54e 100755 (executable)
@@ -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])