Skip to content

Conversation

@jsmnbom
Copy link
Member

@jsmnbom jsmnbom commented Jun 17, 2017

  • Move decorators to module. It really wasn't clear how decorators inside classes work, and why they didn't have a self parameter, but still wasn't static. This also makes them effectively private without having to underscore them, which I think we should have done long time ago atm. Note that this might break backwards compatibility slightly (only if people are daft enough to have used the decorators themselves)
  • Don't call _message_wrapper directly. Ever. Instead always use the message decorator, since it's what it's there for. Closes Weirdness with Bot._message_wrapper #627
  • Don't use the message decorator if the method isn't supposed to return a message. The decorator could handle values like True (which is often the return value), but to someone reading the code, it seems like it's a message returning method even when it wasn't.
  • Always document timeout and **kwargs
  • Log all methods

Mostly done to make pycharm stop bloody complaining :P

jsmnbom added 2 commits June 17, 2017 12:25
- Move decorators to module. It really wasn't clear how decorators inside classes work, and why they didn't have a self parameter, but still wasn't static. This also makes them effectively private without having to underscore them, which I think we should have done long time ago atm. Note that this might break backwards compatibility slightly (only if people are daft enough to have used the decorators themselves)
- Don't call _message_wrapper directly. Ever. Instead always use the message decorator, since it's what it's there for. Closes #627
- Don't use the message decorator if the method isn't supposed to return a message. The decorator could handle values like True (which is often the return value), but to someone reading the code, it seems like it's a message returning method even when it wasn't.
- Always document timeout and **kwargs
- Log all methods
@jh0ker jh0ker merged commit faddb92 into master Jun 18, 2017
@jsmnbom jsmnbom deleted the clean-up-bot branch June 18, 2017 10:43
@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weirdness with Bot._message_wrapper

3 participants