Update style checks & fix newly detected issues #1400
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pinned
flake8
to 3.6.x, which should prevent surprise CI failures like those encountered this week (in #1398 and #1399) when an update introduced new checks.W504 "line break after binary operator" is ignored by default, and had to be added in
checkstyle.sh
's list of ignored error codes. (Using--ignore=list,of,codes
overrides the default list.)Two places where
raise NotImplemented()
was used incorrectly (instead ofraise NotImplementedError()
) were corrected.Most of the changes fix invalid escape sequences in regex strings all over the place—strings that likely should have already used
r''
but didn't for whatever reason. A few (mostly docstrings) were fixed by just escaping the backslash(es) properly.I hope that the CI build of this PR goes off without a hitch… because local testing still isn't quite like running on Travis. Then all that's left is to finish testing all the functions I touched to make sure converting rules etc. to
r'string'
didn't break something unexpectedly. (It shouldn't, but still… surprises suck.)