Skip to content

Commit d78e85c

Browse files
committed
utils: fix type hint in is_private_ip()
1 parent 523b947 commit d78e85c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

slips_files/common/slips_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ def is_port_in_use(self, port: int) -> bool:
394394
sock.close()
395395
return True
396396

397-
def is_private_ip(self, ip: Union[ipaddress, str]) -> bool:
397+
def is_private_ip(
398+
self, ip: Union[ipaddress.IPv4Address, ipaddress.IPv6Address, str]
399+
) -> bool:
398400
ip_classes = {ipaddress.IPv4Address, ipaddress.IPv6Address}
399401
for class_ in ip_classes:
400402
if isinstance(ip, class_):

0 commit comments

Comments
 (0)