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

help: hotfix & small refactor #1573

Merged
merged 2 commits into from Apr 25, 2019
Merged

help: hotfix & small refactor #1573

merged 2 commits into from Apr 25, 2019

Conversation

dgw
Copy link
Member

@dgw dgw commented Apr 25, 2019

While I was fixing the iteritems() py3 regression from #1459, I saw some other stuff that could use tweaking. Moved a bit of code around, and rewrote some comments—nbd really. Should be an easy ✔️

dgw added 2 commits April 25, 2019 18:21
Regression introduced by #1459 (`dict.iteritems()` no longer exists in
Python 3; only `dict.items()` does, with the same internal behavior as
what `dict.iteritems()` did in Python 2)
There's no reason to define `help_prefix` as a global; just use
`bot.config.core.help_prefix` everywhere instead and dump the global.

There's also no reason to define the tracked settings in `setup()`
instead of hard-coding them with the other constants.

Between that, breaking up some long lines, and renaming stuff, this
turned out to be a pretty big diff that "does nothing" from a user's
point of view, but hopefully it will improve our results with tools like
Scrutinizer (which flagged some of these "issues").
@dgw dgw added the Bugfix Generally, PRs that reference (and fix) one or more issue(s) label Apr 25, 2019
@dgw dgw added this to the 7.0.0 milestone Apr 25, 2019
@dgw dgw requested a review from HumorBaby April 25, 2019 23:28
Copy link
Contributor

@HumorBaby HumorBaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@dgw dgw merged commit 6c8433e into master Apr 25, 2019
@dgw dgw deleted the help-hotfix branch April 25, 2019 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Generally, PRs that reference (and fix) one or more issue(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants