(hostname: str)
| 227 | |
| 228 | |
| 229 | def is_ipv4_hostname(hostname: str) -> bool: |
| 230 | try: |
| 231 | ipaddress.IPv4Address(hostname.split("/")[0]) |
| 232 | except Exception: |
| 233 | return False |
| 234 | return True |
| 235 | |
| 236 | |
| 237 | def is_ipv6_hostname(hostname: str) -> bool: |
no outgoing calls
no test coverage detected