Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update style checks & fix newly detected issues #1400

Merged
merged 1 commit into from
Nov 2, 2018
Merged

Update style checks & fix newly detected issues #1400

merged 1 commit into from
Nov 2, 2018

Conversation

dgw
Copy link
Member

@dgw dgw commented Oct 27, 2018

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 of raise 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.)

@dgw dgw self-assigned this Oct 27, 2018
Pinned flake8 to 3.6.x, which should prevent surprise CI failures like
those encountered this week 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
of `raise 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.
@dgw
Copy link
Member Author

dgw commented Oct 28, 2018

Decided to leave the version module cleanup for a future "module cruft" branch instead. This PR now contains only the checkstyle-related updates.

@dgw dgw mentioned this pull request Oct 28, 2018
@dgw dgw merged commit ca02501 into sopel-irc:master Nov 2, 2018
@dgw dgw deleted the update-checkstyle branch November 2, 2018 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant