1
0
mirror of https://github.com/django/django.git synced 2025-10-27 23:56:08 +00:00

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

@@ -33,7 +33,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
def delete_model(self, model):
# Run superclass action
super(DatabaseSchemaEditor, self).delete_model(model)
super().delete_model(model)
# Clean up any autoincrement trigger
self.execute("""
DECLARE
@@ -49,7 +49,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
def alter_field(self, model, old_field, new_field, strict=False):
try:
super(DatabaseSchemaEditor, self).alter_field(model, old_field, new_field, strict)
super().alter_field(model, old_field, new_field, strict)
except DatabaseError as e:
description = str(e)
# If we're changing type to an unsupported type we need a
@@ -100,7 +100,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
# Drop the old field
self.remove_field(model, old_field)
# Rename and possibly make the new field NOT NULL
super(DatabaseSchemaEditor, self).alter_field(model, new_temp_field, new_field)
super().alter_field(model, new_temp_field, new_field)
def normalize_name(self, name):
"""