Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/ruff-0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Diapolo10 authored Aug 19, 2024
2 parents 98bc097 + e2ffd2c commit ae47af8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/iplib3/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ def __new__(cls: type[IPAddress], # noqa: PYI034
"""Create PureAddress."""
if isinstance(address, str):
# Only IPv4-addresses have '.', ':' is used in both IPv4 and IPv6
cls = IPv4 if '.' in address else IPv6
cls = IPv4 if '.' in address else IPv6 # noqa: PLW0642

self = object.__new__(cls)

self.__init__(address=address, port_num=port_num, **kwargs) # type: ignore # noqa: PGH003 # mypy: ignore
return self

def __init__(self, address: int | None = IPV4_LOCALHOST, port_num: int | None = None) -> None:
"""Init PureAddres."""
"""Init PureAddress."""
super().__init__(num=address, port=port_num)
self._ipv4: IPv4 | None = None
self._ipv6: IPv6 | None = None
Expand Down

0 comments on commit ae47af8

Please sign in to comment.