Refactor wrong super() parents in a few managers.

This commit is contained in:
Griatch 2017-01-26 21:35:13 +01:00
parent 4699b38b31
commit a09835049b
5 changed files with 13 additions and 13 deletions

View file

@ -864,7 +864,7 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
self.location = None # this updates contents_cache for our location
# Perform the deletion of the object
super(ObjectDB, self).delete()
super(DefaultObject, self).delete()
return True
def access(self, accessing_obj, access_type='read', default=False, no_superuser_bypass=False, **kwargs):

View file

@ -382,7 +382,7 @@ class DefaultPlayer(with_metaclass(TypeclassBase, PlayerDB)):
self.attributes.clear()
self.nicks.clear()
self.aliases.clear()
super(PlayerDB, self).delete(*args, **kwargs)
super(DefaultPlayer, self).delete(*args, **kwargs)
## methods inherited from database model
def msg(self, text=None, from_obj=None, session=None, options=None, **kwargs):

View file

@ -51,7 +51,7 @@ class SSLProtocol(TelnetProtocol):
is done with encryption.
"""
def __init__(self, *args, **kwargs):
super(TelnetProtocol, self).__init__(*args, **kwargs)
super(SSLProtocol, self).__init__(*args, **kwargs)
self.protocol_name = "ssl"
def verify_SSL_key_and_cert(keyfile, certfile):

View file

@ -535,7 +535,7 @@ class TypeclassManager(TypedObjectManager):
"""
kwargs.update({"db_typeclass_path":self.model.path})
return super(TypedObjectManager, self).get(**kwargs)
return super(TypeclassManager, self).get(**kwargs)
def filter(self, *args, **kwargs):
"""
@ -553,7 +553,7 @@ class TypeclassManager(TypedObjectManager):
"""
kwargs.update({"db_typeclass_path":self.model.path})
return super(TypedObjectManager, self).filter(*args, **kwargs)
return super(TypeclassManager, self).filter(*args, **kwargs)
def all(self):
"""
@ -563,7 +563,7 @@ class TypeclassManager(TypedObjectManager):
objects (queryset): The objects found.
"""
return super(TypedObjectManager, self).all().filter(db_typeclass_path=self.model.path)
return super(TypeclassManager, self).all().filter(db_typeclass_path=self.model.path)
def first(self):
"""
@ -577,7 +577,7 @@ class TypeclassManager(TypedObjectManager):
on the model base used.
"""
return super(TypedObjectManager, self).filter(db_typeclass_path=self.model.path).first()
return super(TypeclassManager, self).filter(db_typeclass_path=self.model.path).first()
def last(self):
"""
@ -591,7 +591,7 @@ class TypeclassManager(TypedObjectManager):
on the model base used.
"""
return super(TypedObjectManager, self).filter(db_typeclass_path=self.model.path).last()
return super(TypeclassManager, self).filter(db_typeclass_path=self.model.path).last()
def count(self):
"""
@ -601,7 +601,7 @@ class TypeclassManager(TypedObjectManager):
integer : Number of objects found.
"""
return super(TypedObjectManager, self).filter(db_typeclass_path=self.model.path).count()
return super(TypeclassManager, self).filter(db_typeclass_path=self.model.path).count()
def _get_subclasses(self, cls):
"""
@ -634,7 +634,7 @@ class TypeclassManager(TypedObjectManager):
paths = [self.model.path] + ["%s.%s" % (cls.__module__, cls.__name__)
for cls in self._get_subclasses(self.model)]
kwargs.update({"db_typeclass_path__in":paths})
return super(TypedObjectManager, self).get(**kwargs)
return super(TypeclassManager, self).get(**kwargs)
def filter_family(self, *args, **kwargs):
"""
@ -655,7 +655,7 @@ class TypeclassManager(TypedObjectManager):
paths = [self.model.path] + ["%s.%s" % (cls.__module__, cls.__name__)
for cls in self._get_subclasses(self.model)]
kwargs.update({"db_typeclass_path__in":paths})
return super(TypedObjectManager, self).filter(*args, **kwargs)
return super(TypeclassManager, self).filter(*args, **kwargs)
def all_family(self):
"""
@ -668,6 +668,6 @@ class TypeclassManager(TypedObjectManager):
"""
paths = [self.model.path] + ["%s.%s" % (cls.__module__, cls.__name__)
for cls in self._get_subclasses(self.model)]
return super(TypedObjectManager, self).all().filter(db_typeclass_path__in=paths)
return super(TypeclassManager, self).all().filter(db_typeclass_path__in=paths)

View file

@ -653,7 +653,7 @@ class EvEditor(object):
if savefunc:
self._savefunc = savefunc
else:
self._savefunc = lambda caller: caller.msg(_ERROR_NO_SAVEFUNC)
self._savefunc = lambda caller, buffer: caller.msg(_ERROR_NO_SAVEFUNC)
if quitfunc:
self._quitfunc = quitfunc
else: