ipaddress.ip_network
annotations ban tuple arguments
#8570
Labels
stubs: false positive
Type checkers report false errors
Right now the type annotations for the
ipaddress.ip_network
function only allow its argument to be one of anint
, astr
,bytes
, anIPv4Address
/IPv6Address
, or an existing network.However, currently the
ipaddress.ip_network
function also supports aTuple[IPv4Address | IPv6Address | str | int | bytes, int]
as an argument, in which case the first element becomes the base address and the second becomes the network prefix length:The text was updated successfully, but these errors were encountered: