Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ For example:
# will turn it into IPv6 if appropriate.
yield "::1", 7687
# This will be interpreted as IPv6 directly, but DNS resolution will
# happen still.
# still happen.
yield "::1", 7687, 0, 0
yield "127.0.0.1", 7687

Expand Down
4 changes: 2 additions & 2 deletions docs/source/async_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ For example:
import neo4j


def custom_resolver(socket_address):
async def custom_resolver(socket_address):
# assert isinstance(socket_address, neo4j.Address)
if socket_address != ("example.com", 9999):
raise OSError(f"Unexpected socket address {socket_address!r}")
Expand All @@ -182,7 +182,7 @@ For example:
# will turn it into IPv6 if appropriate.
yield "::1", 7687
# This will be interpreted as IPv6 directly, but DNS resolution will
# happen still.
# still happen.
yield "::1", 7687, 0, 0
yield "127.0.0.1", 7687

Expand Down
10 changes: 5 additions & 5 deletions src/neo4j/addressing.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def parse(

The string must be in the format ``host:port`` (IPv4) or
``[host]:port`` (IPv6).
If not port is specified, or is emtpy, ``default_port`` will be used.
If no port is specified, or is empty, ``default_port`` will be used.
If no host is specified, or is empty, ``default_host`` will be used.

>>> Address.parse("localhost:7687")
Expand All @@ -150,9 +150,9 @@ def parse(

:param s: The string to parse.
:param default_host: The default host to use if none is specified.
:data:`None` will be substituted with ``"localhost"``.
:data:`None` idicates to use ``"localhost"`` as default.
:param default_port: The default port to use if none is specified.
:data:`None` will be substituted with ``0``.
:data:`None` idicates to use ``0`` as default.

:return: The parsed address.
"""
Expand Down Expand Up @@ -200,9 +200,9 @@ def parse_list(

:param s: The string(s) to parse.
:param default_host: The default host to use if none is specified.
:data:`None` will be substituted with ``"localhost"``.
:data:`None` indicates to use ``"localhost"`` as default.
:param default_port: The default port to use if none is specified.
:data:`None` will be substituted with ``0``.
:data:`None` indicates to use ``0`` as default.

:return: The list of parsed addresses.
"""
Expand Down