Skip to content

Commit

Permalink
refactor: flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
gtdang committed Oct 22, 2024
1 parent 3cc0756 commit d46f2a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions hnn_core/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def _get_cell_index_by_synapse_type(net):

def list_src_gids(indices):
return np.concatenate([list(net.connectivity[conn_idx]['src_gids'])
for conn_idx in indices]).tolist()
for conn_idx in indices]).tolist()

e_conns = pick_connection(net, receptor=['ampa', 'nmda'])
e_cells = list_src_gids(e_conns)
Expand Down Expand Up @@ -1543,12 +1543,12 @@ def get_synaptic_gains(self):
dict: A dictionary with the connection types ('e_e', 'e_i', 'i_e',
'i_i') as keys and their corresponding gain values.
"""
# Initialize gain values with default gain of 1.0 for all connection types
# Initialize gain values with default gain of 1.0
values = {k: 1.0 for k in ('e_e', 'e_i', 'i_e', 'i_i')}

e_cells, i_cells = _get_cell_index_by_synapse_type(self)

# Define the connection types and corresponding source/target cell indexes
# Define the connection types and source/target cell indexes
conn_types = {
'e_e': (e_cells, e_cells),
'e_i': (e_cells, i_cells),
Expand All @@ -1570,7 +1570,6 @@ def get_synaptic_gains(self):

return values


def plot_cells(self, ax=None, show=True):
"""Plot the cells using Network.pos_dict.
Expand Down
1 change: 0 additions & 1 deletion hnn_core/tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,4 +1157,3 @@ def test_adjust_synaptic_weights(setup_gui):

gains_altered = _single_simulation['net'].get_synaptic_gains()
assert gains_altered == {'e_e': 0.5, 'e_i': 0.5, 'i_e': 1.1, 'i_i': 1.1}

0 comments on commit d46f2a5

Please sign in to comment.