mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Small change in order of sortBy and shrinkList.
This commit is contained in:
parent
c98a25d6a2
commit
1da0f301f5
@ -810,12 +810,12 @@ class FunCommands(callbacks.Privmsg):
|
|||||||
irc.reply(msg, 'No definition for %r could be found.' % word)
|
irc.reply(msg, 'No definition for %r could be found.' % word)
|
||||||
return
|
return
|
||||||
L = []
|
L = []
|
||||||
utils.sortBy(lambda d: len(d.getdefstr()), definitions)
|
|
||||||
for d in definitions:
|
for d in definitions:
|
||||||
(db, s) = (d.getdb().getname(), d.getdefstr())
|
(db, s) = (d.getdb().getname(), d.getdefstr())
|
||||||
db = ircutils.bold(db)
|
db = ircutils.bold(db)
|
||||||
s = utils.normalizeWhitespace(s).rstrip(';.,')
|
s = utils.normalizeWhitespace(s).rstrip(';.,')
|
||||||
L.append('%s: %s' % (db, s))
|
L.append('%s: %s' % (db, s))
|
||||||
|
utils.sortBy(len, L)
|
||||||
ircutils.shrinkList(L, '; ')
|
ircutils.shrinkList(L, '; ')
|
||||||
if not L:
|
if not L:
|
||||||
irc.reply(msg, 'No definitions small enough to fit into an IRC ' \
|
irc.reply(msg, 'No definitions small enough to fit into an IRC ' \
|
||||||
|
Loading…
Reference in New Issue
Block a user