CLN/STYLE: Lint comprehensions
- [x] closes #18464
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Using flake8-comprehensions (xref https://github.com/pandas-dev/pandas/issues/20588#issuecomment-405057018) to lint for unnecessary comprehensions. I just added this to the 2.7-travis build since it appears to be our linting build.
Syntax error in one of the edits.  +1 on the concept. Tons of flake complaints, may need to implement gradually. Now it’s mostly upset about lambdas.  OTOH it’s reassuring to see mine isn’t the only PR that pytables is messing up. Is there a predefined set of lint codes we ignore?

I am a little puzzled why these lint checks now started to fire; I figure it has something to do with the scope of checks when `--ignore` is specified. > Is there a predefined set of lint codes we ignore?

in setup.cfg Possibly for the while-were-at-it pile: 

#11954 checks for unnecessary backslashes (could this be done with just a grep?)
Enable checks for bare “except:” statements in a subset of files and gradually expand? we have a fixed version of flake8 (an open issue about this too) - which doesn’t check bare excepts  pls rebase The travis failure is from the reoccuring `ResourceWarning` that appears in `test_dialect_conflict`  thanks @mroeschke 

if you think need to open additional issues for the skipped pep codes, pls do. alternatively maybe just add some docs on them on why we need to keep them there (e.g. so next person isn't wondering why those particular codes).