pydata/pandas — pull request #8286 by iwschris (2014-09-17 01:41:42+00:00)
Title: CLN Pep8 on format.py

While looking at making a separate PR in format.py, I decided to first clean up the file and make it PEP8 compliant. I used 99 maximum-line-length per http://legacy.python.org/dev/peps/pep-0008/#maximum-line-length.

I also noticed that line 965 (in master) has a list comprehension that iterates through a non-instantiated variable (__row__):

```python
for i in range(nrows):
if truncate_v and i == (self.fmt.tr_row_num):
str_sep_row = [ '...' for ele in row ]
self.write_tr(str_sep_row, indent, self.indent_delta, tags=None, nindex_levels=1)

row = []
row.append(index_values[i])
row.extend(fmt_values[j][i] for j in range(ncols))
```

By the time it has gone through the loop once, __row__ is set, but it really should be instantiated ahead of the loop to be safe.

Additionally, I thought it might be useful to add a PEP8 test in test_format, just to make sure that future commits don't break PEP8.