mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-29 22:29:24 +01:00
Remove need for fix_methodattrs.
This commit is contained in:
parent
c0ac84bb53
commit
34d384bd67
@ -248,7 +248,7 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
|
||||
|
||||
def getCommandHelp(self, command, simpleSyntax=None):
|
||||
method = self.getCommandMethod(command)
|
||||
if method.im_func.__name__ == 'learn':
|
||||
if method.__func__.__name__ == 'learn':
|
||||
chan = None
|
||||
if dynamic.msg is not None:
|
||||
chan = dynamic.msg.args[0]
|
||||
|
2
setup.py
2
setup.py
@ -158,7 +158,7 @@ try:
|
||||
log.debug(msg, *args)
|
||||
|
||||
fixer_names = ['fix_basestring',
|
||||
'fix_metaclass', 'fix_methodattrs',
|
||||
'fix_metaclass',
|
||||
'fix_numliterals',
|
||||
'fix_unicode', 'fix_xrange']
|
||||
fixers = list(map(lambda x:'lib2to3.fixes.'+x, fixer_names))
|
||||
|
@ -1021,7 +1021,7 @@ class CommandThread(world.SupyThread):
|
||||
"""
|
||||
def __init__(self, target=None, args=(), kwargs={}):
|
||||
self.command = args[0]
|
||||
self.cb = target.im_self
|
||||
self.cb = target.__self__
|
||||
threadName = 'Thread #%s (for %s.%s)' % (world.threadsSpawned,
|
||||
self.cb.name(),
|
||||
self.command)
|
||||
@ -1175,7 +1175,7 @@ class Commands(BasePlugin):
|
||||
if hasattr(self, name):
|
||||
method = getattr(self, name)
|
||||
if inspect.ismethod(method):
|
||||
code = method.im_func.__code__
|
||||
code = method.__func__.__code__
|
||||
return inspect.getargs(code)[0] == self.commandArgs
|
||||
else:
|
||||
return False
|
||||
@ -1222,7 +1222,7 @@ class Commands(BasePlugin):
|
||||
else:
|
||||
method = getattr(self, command[0])
|
||||
if inspect.ismethod(method):
|
||||
code = method.im_func.__code__
|
||||
code = method.__func__.__code__
|
||||
if inspect.getargs(code)[0] == self.commandArgs:
|
||||
return method
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user