Remove type hint as it doesn't work well with python2. 😢

This commit is contained in:
Shay Nehmad 2019-08-26 15:24:55 +03:00
parent 4601882ba2
commit 05a1b2d235
1 changed files with 4 additions and 8 deletions

View File

@ -1,14 +1,10 @@
from common.network.network_range import NetworkRange
def get_ip_in_src_and_not_in_dst(ip_addresses, source_subnet, target_subnet):
# type: (List[str], NetworkRange, NetworkRange) -> Union[str, None]
"""
Finds an IP address in ip_addresses which is in source_subnet but not in target_subnet.
:param ip_addresses: List of IP addresses to test.
:param source_subnet: Subnet to want an IP to not be in.
:param target_subnet: Subnet we want an IP to be in.
:return: The cross segment IP if in source but not in target, else None.
:param ip_addresses: List[str]: List of IP addresses to test.
:param source_subnet: NetworkRange: Subnet to want an IP to not be in.
:param target_subnet: NetworkRange: Subnet we want an IP to be in.
:return: The cross segment IP if in source but not in target, else None. Union[str, None]
"""
if get_ip_if_in_subnet(ip_addresses, target_subnet) is not None:
return None