mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #23919 -- Replaced super(ClassName, self) with super().
This commit is contained in:
parent
dc165ec8e5
commit
d6eaf7c018
339 changed files with 1221 additions and 1296 deletions
|
@ -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))
|
||||
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue