]> 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)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 30 Mar 2023 20:52:53 +0000 (16:52 -0400)
This change makes this file pass mypy checking on mypy 0.981.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py

index b69f7c40cae60a46dfe3a9903050420eb5144cf4..42c32285fcfc4da35f79acb47c87b597bbb255a1 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])