fix bugs found with stricter flake8 rules

- When you don't use wildcards, flake8 will find places where you used an
  undefined name.

- This commit has all the bugfixes resulting from this static check.
This commit is contained in:
Todd Gamblin
2017-10-23 14:20:39 +02:00
parent 7dd79094b0
commit 0bb1eb32f2
8 changed files with 19 additions and 11 deletions

View File

@@ -188,7 +188,7 @@ def colify(elts, **options):
elif method == "uniform":
config = config_uniform_cols(elts, console_cols, padding, cols)
else:
raise ValueError("method must be one of: " + allowed_methods)
raise ValueError("method must be either 'variable' or 'uniform'")
cols = config.cols
rows = (len(elts) + cols - 1) // cols