Page MenuHomePhabricator
Paste P3249

User.thanks_enabled v2.0

Authored by darthbhyrava on Jun 15 2016, 3:09 PM.
def thanks_enabled(self):
Determine if the user has thanks notifs enabled.
NOTE: This doesn't accurately determine if thanks is enabled for user.
Privacy of thanks preferences is under discussion, please see, and
@rtype: bool
return (not (self.isAnonymous()))

Event Timeline

darthbhyrava changed the title of this paste from User.thanks_enabled to User.thanks_enabled v2.0.Jun 17 2016, 12:40 AM
darthbhyrava edited the content of this paste. (Show Details)

You don't need any of those parenthesis... just return not self.isAnonymous() is good enough in Python.