Refs #23919 -- Replaced super(ClassName, self) with super().

This commit is contained in:
chillaranand 2017-01-21 18:43:44 +05:30 committed by Tim Graham
parent dc165ec8e5
commit d6eaf7c018
339 changed files with 1221 additions and 1296 deletions

View file

@ -39,7 +39,7 @@ class ActiveTranslationField(models.ForeignObject):
return {'lang': get_language()}
def contribute_to_class(self, cls, name):
super(ActiveTranslationField, self).contribute_to_class(cls, name)
super().contribute_to_class(cls, name)
setattr(cls, self.name, ArticleTranslationDescriptor(self))

View file

@ -36,7 +36,7 @@ class StartsWithRelation(models.ForeignObject):
def __init__(self, *args, **kwargs):
kwargs['on_delete'] = models.DO_NOTHING
super(StartsWithRelation, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
@property
def field(self):
@ -64,7 +64,7 @@ class StartsWithRelation(models.ForeignObject):
return [PathInfo(from_opts, to_opts, (to_opts.pk,), self.remote_field, False, False)]
def contribute_to_class(self, cls, name, private_only=False):
super(StartsWithRelation, self).contribute_to_class(cls, name, private_only)
super().contribute_to_class(cls, name, private_only)
setattr(cls, self.name, ReverseManyToOneDescriptor(self))