summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/postgresql')
-rw-r--r--django/db/backends/postgresql/base.py4
-rw-r--r--django/db/backends/postgresql/introspection.py2
-rw-r--r--django/db/backends/postgresql/operations.py2
-rw-r--r--django/db/backends/postgresql/schema.py8
4 files changed, 7 insertions, 9 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py
index a3b293ee36..2459748f1b 100644
--- a/django/db/backends/postgresql/base.py
+++ b/django/db/backends/postgresql/base.py
@@ -141,7 +141,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
ops_class = DatabaseOperations
def __init__(self, *args, **kwargs):
- super(DatabaseWrapper, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self._named_cursor_idx = 0
def get_connection_params(self):
@@ -248,7 +248,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
@property
def _nodb_connection(self):
- nodb_connection = super(DatabaseWrapper, self)._nodb_connection
+ nodb_connection = super()._nodb_connection
try:
nodb_connection.ensure_connection()
except (Database.DatabaseError, WrappedDatabaseError):
diff --git a/django/db/backends/postgresql/introspection.py b/django/db/backends/postgresql/introspection.py
index 34150c6f48..d663de61e5 100644
--- a/django/db/backends/postgresql/introspection.py
+++ b/django/db/backends/postgresql/introspection.py
@@ -43,7 +43,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
AND c.relname = %s"""
def get_field_type(self, data_type, description):
- field_type = super(DatabaseIntrospection, self).get_field_type(data_type, description)
+ field_type = super().get_field_type(data_type, description)
if description.default and 'nextval' in description.default:
if field_type == 'IntegerField':
return 'AutoField'
diff --git a/django/db/backends/postgresql/operations.py b/django/db/backends/postgresql/operations.py
index 542fe223cb..e612a60ca8 100644
--- a/django/db/backends/postgresql/operations.py
+++ b/django/db/backends/postgresql/operations.py
@@ -261,7 +261,7 @@ class DatabaseOperations(BaseDatabaseOperations):
lhs_sql, lhs_params = lhs
rhs_sql, rhs_params = rhs
return "age(%s, %s)" % (lhs_sql, rhs_sql), lhs_params + rhs_params
- return super(DatabaseOperations, self).subtract_temporals(internal_type, lhs, rhs)
+ return super().subtract_temporals(internal_type, lhs, rhs)
def fulltext_search_sql(self, field_name):
raise NotImplementedError(
diff --git a/django/db/backends/postgresql/schema.py b/django/db/backends/postgresql/schema.py
index bffa8bd45b..e9928999db 100644
--- a/django/db/backends/postgresql/schema.py
+++ b/django/db/backends/postgresql/schema.py
@@ -23,7 +23,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
return psycopg2.extensions.adapt(value)
def _field_indexes_sql(self, model, field):
- output = super(DatabaseSchemaEditor, self)._field_indexes_sql(model, field)
+ output = super()._field_indexes_sql(model, field)
like_index_statement = self._create_like_index_sql(model, field)
if like_index_statement is not None:
output.append(like_index_statement)
@@ -101,13 +101,11 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
],
)
else:
- return super(DatabaseSchemaEditor, self)._alter_column_type_sql(
- table, old_field, new_field, new_type
- )
+ return super()._alter_column_type_sql(table, old_field, new_field, new_type)
def _alter_field(self, model, old_field, new_field, old_type, new_type,
old_db_params, new_db_params, strict=False):
- super(DatabaseSchemaEditor, self)._alter_field(
+ super()._alter_field(
model, old_field, new_field, old_type, new_type, old_db_params,
new_db_params, strict,
)