Skip to content

Commit 237b784

Browse files
committed
Fix docstrings to satisfy the new tests
1 parent 55b1803 commit 237b784

8 files changed

Lines changed: 12 additions & 12 deletions

File tree

plugins/admin_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def me(text, conn, chan, message, nick, admin_log):
369369
@asyncio.coroutine
370370
@hook.command(autohelp=False, permissions=["botcontrol"])
371371
def listchans(conn, chan, message, notice):
372-
"""-- Lists the current channels the bot is in"""
372+
"""- Lists the current channels the bot is in"""
373373
chans = ', '.join(sorted(conn.channels, key=lambda x: x.strip('#').lower()))
374374
lines = formatting.chunk_str("I am currently in: {}".format(chans))
375375
for line in lines:

plugins/cryptocurrency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def init_aliases():
6767
# main command
6868
@hook.command("crypto", "cryptocurrency")
6969
def crypto_command(text, reply):
70-
""" <ticker> [currency] -- Returns current value of a cryptocurrency """
70+
"""<ticker> [currency] - Returns current value of a cryptocurrency"""
7171
args = text.split()
7272
ticker = args.pop(0)
7373

plugins/drinks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def load_drinks(bot):
1515

1616
@hook.command()
1717
def drink(text, chan, action):
18-
"""<nick>, makes the user a random cocktail."""
18+
"""<nick> - makes the user a random cocktail."""
1919
index = random.randint(0,len(drinks)-1)
2020
drink = drinks[index]['title']
2121
url = web.try_shorten(drinks[index]['url'])

plugins/geoip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def load_geoip(loop):
7676
@asyncio.coroutine
7777
@hook.command
7878
def geoip(text, reply, loop):
79-
""" geoip <host|ip> -- Looks up the physical location of <host|ip> using Maxmind GeoLite """
79+
"""<host|ip> - Looks up the physical location of <host|ip> using Maxmind GeoLite """
8080
global geoip_reader
8181

8282
if not geoip_reader:

plugins/piglatin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def load_nltk():
6767

6868
@hook.command("pig", "piglatin")
6969
def piglatin(text):
70-
""" pig <text> -- Converts <text> to pig latin. """
70+
"""<text> - Converts <text> to pig latin."""
7171
global pronunciations
7272
if not pronunciations:
7373
return "Please wait, getting NLTK ready!"
@@ -94,4 +94,4 @@ def piglatin(text):
9494
if text.isupper():
9595
return " ".join(words).upper()
9696
else:
97-
return " ".join(words)
97+
return " ".join(words)

plugins/profile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def moreprofile(text, chan, nick, notice):
8787

8888
@hook.command()
8989
def profile(text, chan, notice, nick):
90-
"""<nick> [category] Returns a user's saved profile data from \"<category>\", or lists all available profile categories for the user if no category specified"""
90+
"""<nick> [category] - Returns a user's saved profile data from \"<category>\", or lists all available profile categories for the user if no category specified"""
9191
chan_cf = chan.casefold()
9292
nick_cf = nick.casefold()
9393

@@ -133,7 +133,7 @@ def profile(text, chan, notice, nick):
133133

134134
@hook.command()
135135
def profileadd(text, chan, nick, notice, db):
136-
"""<category> <content> Adds data to your profile in the current channel under \"<category>\""""
136+
"""<category> <content> - Adds data to your profile in the current channel under \"<category>\""""
137137
if nick.casefold() == chan.casefold():
138138
return "Profile data can not be set outside of channels"
139139

@@ -163,7 +163,7 @@ def profileadd(text, chan, nick, notice, db):
163163

164164
@hook.command()
165165
def profiledel(nick, chan, text, notice, db):
166-
"""<category> Deletes \"<category>\" from a user's profile"""
166+
"""<category> - Deletes \"<category>\" from a user's profile"""
167167
if nick.casefold() == chan.casefold():
168168
return "Profile data can not be set outside of channels"
169169

plugins/time_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def load_key(bot):
4444

4545
@hook.command("time")
4646
def time_command(text, reply):
47-
"""<location> -- Gets the current time in <location>."""
47+
"""<location> - Gets the current time in <location>."""
4848
if not dev_key:
4949
return "This command requires a Google Developers Console API key."
5050

@@ -110,7 +110,7 @@ def time_command(text, reply):
110110

111111
@hook.command(autohelp=False)
112112
def beats(text):
113-
""" -- Gets the current time in .beats (Swatch Internet Time). """
113+
"""- Gets the current time in .beats (Swatch Internet Time)."""
114114

115115
if text.lower() == "wut":
116116
return "Instead of hours and minutes, the mean solar day is divided " \

plugins/wyr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def get_wyr(headers):
4646

4747
@hook.command("wyr", "wouldyourather", autohelp=False)
4848
def wyr(bot):
49-
""" -- What would you rather do? """
49+
"""- What would you rather do?"""
5050
headers = {"User-Agent": bot.user_agent}
5151

5252
# keep trying to get entries until we find one that is not filtered

0 commit comments

Comments
 (0)