Skip to content

Commit

Permalink
Do None instead of falsy checks on Command attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
scarletcafe authored and Rapptz committed Jan 29, 2019
1 parent dc8aa7c commit e1c94a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions discord/ext/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,9 +718,9 @@ def short_doc(self):
If that lookup leads to an empty string then the first line of the
:attr:`help` attribute is used instead.
"""
if self.brief:
if self.brief is not None:
return self.brief
if self.help:
if self.help is not None:
return self.help.split('\n', 1)[0]
return ''

Expand All @@ -739,7 +739,7 @@ def signature(self):
name = self.name if not parent else parent + ' ' + self.name
result.append(name)

if self.usage:
if self.usage is not None:
result.append(self.usage)
return ' '.join(result)

Expand Down

0 comments on commit e1c94a3

Please sign in to comment.