Skip to content

ip_interface function accepts tuples, typing does not #8966

Closed
@iawells

Description

@iawells

We have:

def ip_interface(address: _RawIPAddress | _RawNetworkPart) -> IPv4Interface | IPv6Interface: ...

But this is valid:

a: IPv4Address # e.g. = IPv4Address('10.0.0.1')

i = ip_interface((a, 24,))
i = ip_interface(('10.0.0.1', 24,))

See also: #8634 fixing #8570 - both on the analagous ip_network.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions