Fix ipaddress._BaseNetwork.hosts return type (#14658)

Both `IPv4Network` and `IPv6Network` can return a single-element list instead of iterator.
This commit is contained in:
Dmitriy Vashurin
2025-08-28 22:26:46 +07:00
committed by GitHub
parent 6ab603f8e6
commit c0fed911d6
+1 -1
View File
@@ -73,7 +73,7 @@ class _BaseNetwork(_IPAddressBase, Generic[_A]):
@property
def broadcast_address(self) -> _A: ...
def compare_networks(self, other: Self) -> int: ...
def hosts(self) -> Iterator[_A]: ...
def hosts(self) -> Iterator[_A] | list[_A]: ...
@property
def is_global(self) -> bool: ...
@property