Add the bugbear plugin to the flake8 tox testenv, and mark as
private a couple of loop control variables it identified (B007).
# create the expanded list of keys
for key in data.keys():
- for count in range(data[key]):
+ for _count in range(data[key]):
expanded.append(key)
# return one at random
name = ""
# create a name of random length from the syllables
- for syllable in range(random.randrange(2, 6)):
+ for _syllable in range(random.randrange(2, 6)):
name += weighted_choice(syllables)
# strip any leading quotemark, capitalize and return the name
sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
[testenv:flake8]
-deps = flake8
+deps =
+ flake8
+ flake8-bugbear
commands = flake8 {posargs}
[testenv:selftest_config]