diff options
| author | Simon Charette <charettes@users.noreply.github.com> | 2017-01-19 02:39:46 -0500 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-01-19 08:39:46 +0100 |
| commit | cecc079168e8669138728d31611ff3a1e7eb3a9f (patch) | |
| tree | 2415083d44f84c6f206930fc689a8c0e50a98caa /django/db/models/sql | |
| parent | a5563963397aeee30c32e3c1dab31bfe453ca89f (diff) | |
Refs #23919 -- Stopped inheriting from object to define new style classes.
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/compiler.py | 2 | ||||
| -rw-r--r-- | django/db/models/sql/datastructures.py | 6 | ||||
| -rw-r--r-- | django/db/models/sql/query.py | 6 | ||||
| -rw-r--r-- | django/db/models/sql/where.py | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index 41733210c4..1be406d704 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -15,7 +15,7 @@ from django.db.utils import DatabaseError FORCE = object() -class SQLCompiler(object): +class SQLCompiler: def __init__(self, query, connection, using): self.query = query self.connection = connection diff --git a/django/db/models/sql/datastructures.py b/django/db/models/sql/datastructures.py index 02e4f930e1..81b6cabdc6 100644 --- a/django/db/models/sql/datastructures.py +++ b/django/db/models/sql/datastructures.py @@ -19,11 +19,11 @@ class MultiJoin(Exception): self.names_with_path = path_with_names -class Empty(object): +class Empty: pass -class Join(object): +class Join: """ Used by sql.Query and sql.SQLCompiler to generate JOIN clauses into the FROM entry. For example, the SQL generated could be @@ -125,7 +125,7 @@ class Join(object): return new -class BaseTable(object): +class BaseTable: """ The BaseTable class is used for base table references in FROM clause. For example, the SQL "foo" in diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 3acef8faf5..67d5738976 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -43,7 +43,7 @@ def get_field_names_from_opts(opts): )) -class RawQuery(object): +class RawQuery: """ A single raw SQL query """ @@ -111,7 +111,7 @@ class RawQuery(object): self.cursor.execute(self.sql, params) -class Query(object): +class Query: """ A single SQL query. """ @@ -2049,7 +2049,7 @@ def is_reverse_o2o(field): return field.is_relation and field.one_to_one and not field.concrete -class JoinPromoter(object): +class JoinPromoter: """ A class to abstract away join promotion problems for complex filter conditions. diff --git a/django/db/models/sql/where.py b/django/db/models/sql/where.py index bb4e9252b4..7ce7617bfa 100644 --- a/django/db/models/sql/where.py +++ b/django/db/models/sql/where.py @@ -172,7 +172,7 @@ class WhereNode(tree.Node): return any(child.is_summary for child in self.children) -class NothingNode(object): +class NothingNode: """ A node that matches nothing. """ @@ -182,7 +182,7 @@ class NothingNode(object): raise EmptyResultSet -class ExtraWhere(object): +class ExtraWhere: # The contents are a black box - assume no aggregates are used. contains_aggregate = False @@ -195,7 +195,7 @@ class ExtraWhere(object): return " AND ".join(sqls), list(self.params or ()) -class SubqueryConstraint(object): +class SubqueryConstraint: # Even if aggregates would be used in a subquery, the outer query isn't # interested about those. contains_aggregate = False |
