Skip to content

Commit 44434b1

Browse files
committed
ruff fixes and noqa
1 parent 8919a69 commit 44434b1

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

examples/extra_models_examples/stdp_triplet.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,18 @@ def generate_fixed_frequency_test_data(
152152
size="xx-large")
153153

154154
line_styles = ["--", "-"]
155-
for m_w, d_w, d_e, l, t in zip(weights, data_w, data_e, line_styles, delta_t):
155+
for m_w, d_w, d_e, line_style, t in zip(
156+
weights, data_w, data_e, line_styles, delta_t):
156157
# Calculate deltas from end weights
157158
delta_w = [(w - start_w) / start_w for w in m_w]
158159

159160
# Plot experimental data and error bars
160161
axis.errorbar(
161-
frequencies, d_w, yerr=d_e, color="black", linestyle=l,
162+
frequencies, d_w, yerr=d_e, color="black", linestyle=line_style,
162163
label=r"Experimental data, delta $(\Delta{t}=%dms)$" % t)
163164

164165
# Plot model data
165-
axis.plot(frequencies, delta_w, color="blue", linestyle=l,
166+
axis.plot(frequencies, delta_w, color="blue", linestyle=line_style,
166167
label=r"Triplet rule, delta $(\Delta{t}=%dms)$" % t)
167168

168169
axis.legend(loc="upper right", bbox_to_anchor=(1.0, 1.0))

pendulum/spike_filter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def send_spikes(width, height, min_x, min_y, run_time, label, connection):
6969
start_time = None
7070
max_x = min_x + width
7171
max_y = min_y + height
72-
y_shift = get_n_bits(width)
72+
y_shift = get_n_bits(width) #noqa 841
7373
with open("spikes.csv") as f:
7474
first_time = -1
7575
line = read_csv_line(f)
@@ -85,9 +85,9 @@ def send_spikes(width, height, min_x, min_y, run_time, label, connection):
8585
line = next_line
8686

8787
filtered_lines = [
88-
l for l in same_time_lines
89-
if (l.x >= min_x and l.x < max_x and l.y >= min_y and
90-
l.y < max_y)]
88+
line for line in same_time_lines
89+
if (line.x >= min_x and line.x < max_x and line.y >= min_y and
90+
line.y < max_y)]
9191

9292
if not filtered_lines:
9393
continue

spiNNaker_start/spinnaker_start.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
from spinn_utilities.overrides import overrides
5353

5454
from spinnman.config_setup import unittest_setup
55-
from spinnman.spalloc import SpallocClient, SpallocState
55+
from spinnman.spalloc import SpallocClient
5656
from spinn_utilities.config_holder import set_config
5757

5858
from spinn_machine.machine import Machine

0 commit comments

Comments
 (0)