Skip to content

Commit e81ce39

Browse files
committed
Add parentheses to the line where conn_spec == one_to_one is checked
Previously, one_to_one_cspec was a boolean if isinstance(conn_spec, dict), and a string otherwise. This was obviously a mistake. Note that everywhere further in _process_input_nodes() one_to_one_cspec is always used within an if clause, thus expecting it to be boolean.
1 parent c4e2433 commit e81ce39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pynest/nest/lib/hl_api_connection_helpers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,9 @@ def _process_input_nodes(pre, post, conn_spec):
291291

292292
# check for 'one_to_one' conn_spec
293293
one_to_one_cspec = (
294-
conn_spec if not isinstance(conn_spec, dict) else conn_spec.get("rule", "all_to_all") == "one_to_one"
295-
)
294+
conn_spec if not isinstance(conn_spec, dict)
295+
else conn_spec.get("rule", "all_to_all")
296+
) == "one_to_one"
296297

297298
# check and convert input types
298299
pre_is_nc, post_is_nc = True, True

0 commit comments

Comments
 (0)