Skip to content

Commit 22682d3

Browse files
committed
Latest version of flake8 seems to have added new error codes. In particular, names imported via import * or exec('import ...') are now considered undefined.
1 parent 600154a commit 22682d3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/full-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- name: Lint with flake8
6969
run: |
7070
# stop the build if there are Python syntax errors or undefined names
71-
flake8 pyNN --count --select=E9,F63,F7,F82 --show-source --statistics
71+
flake8 pyNN --count --select=E9,F63,F7,F82 --ignore=F821,F824 --show-source --statistics
7272
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
7373
flake8 pyNN --count --exit-zero --max-complexity=20 --max-line-length=127 --statistics
7474
- name: Run unit and system tests

test/benchmarks/connectors_benchmark.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,28 +73,28 @@ def test(cases=[1]):
7373
synapse = StaticSynapse(weight=w, delay=delay)
7474
rng = NumpyRNG(23434, parallel_safe=parallel_safe)
7575

76-
if case is 1:
76+
if case == 1:
7777
conn = DistanceDependentProbabilityConnector(d_expression, safe=safe, callback=callback, allow_self_connections=autapse, rng=rng)
7878
fig_name = "DistanceDependent_%s_np_%d.png" % (simulator_name, np)
79-
elif case is 2:
79+
elif case == 2:
8080
conn = FixedProbabilityConnector(0.02, safe=safe, callback=callback, allow_self_connections=autapse, rng=rng)
8181
fig_name = "FixedProbability_%s_np_%d.png" % (simulator_name, np)
82-
elif case is 3:
82+
elif case == 3:
8383
conn = AllToAllConnector(delays=delay, safe=safe, callback=callback, allow_self_connections=autapse)
8484
fig_name = "AllToAll_%s_np_%d.png" % (simulator_name, np)
85-
elif case is 4:
85+
elif case == 4:
8686
conn = FixedNumberPostConnector(50, safe=safe, callback=callback, allow_self_connections=autapse, rng=rng)
8787
fig_name = "FixedNumberPost_%s_np_%d.png" % (simulator_name, np)
88-
elif case is 5:
88+
elif case == 5:
8989
conn = FixedNumberPreConnector(50, safe=safe, callback=callback, allow_self_connections=autapse, rng=rng)
9090
fig_name = "FixedNumberPre_%s_np_%d.png" % (simulator_name, np)
91-
elif case is 6:
91+
elif case == 6:
9292
conn = OneToOneConnector(safe=safe, callback=callback)
9393
fig_name = "OneToOne_%s_np_%d.png" % (simulator_name, np)
94-
elif case is 7:
94+
elif case == 7:
9595
conn = FromFileConnector(files.NumpyBinaryFile('Results/connections.dat', mode='r'), safe=safe, callback=callback, distributed=True)
9696
fig_name = "FromFile_%s_np_%d.png" % (simulator_name, np)
97-
elif case is 8:
97+
elif case == 8:
9898
conn = SmallWorldConnector(degree=0.1, rewiring=0., safe=safe, callback=callback, allow_self_connections=autapse)
9999
fig_name = "SmallWorld_%s_np_%d.png" % (simulator_name, np)
100100

0 commit comments

Comments
 (0)