Skip to content

Split up functionality of from_node()

Summary

Split up functionality of from_node() into from_node() which returns one Connection object and from_nodes which can return multiple Connections for different host/protocol-combinations (will always return a dictionary of connections, not a connection object).

Explain your context

The return type of from_node() is either a Connection or a dictionary of Connections. So when we want to call e.g. read_series() mypy doesn't know whether we have a single connection or a dictionary of connections. I would propose to split the functionality of from_node() into from_node() and from_nodes(). Then we would have type safety.

Please list breaking changes, new features or bugfixes

  • Breaking changes:
    • BaseConnection.from_node() can no longer handle different endpoints(host/protocol) for nodes. Use BaseConnection.from_nodes() instead.
  • New features:
  • Bugfixes:

Closes #241 (closed)

Edited by A.Clement

Merge request reports