summaryrefslogtreecommitdiff
path: root/django/db/models/sql/where.py
diff options
context:
space:
mode:
authorAnton Samarchyan <anton.samarchyan@savoirfairelinux.com>2017-01-24 18:04:12 -0500
committerTim Graham <timograham@gmail.com>2017-02-28 09:17:27 -0500
commit60e52a047e55bc4cd5a93a8bd4d07baed27e9a22 (patch)
tree010a363968b1ed41adf2e64c98d572d7148a2a5e /django/db/models/sql/where.py
parentd6e26e5b7c8063c2cc5aa045edea6555bf358fc2 (diff)
Refs #27656 -- Updated django.db docstring verbs according to PEP 257.
Diffstat (limited to 'django/db/models/sql/where.py')
-rw-r--r--django/db/models/sql/where.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/django/db/models/sql/where.py b/django/db/models/sql/where.py
index 7ce7617bfa..ed24b08bd0 100644
--- a/django/db/models/sql/where.py
+++ b/django/db/models/sql/where.py
@@ -13,7 +13,7 @@ OR = 'OR'
class WhereNode(tree.Node):
"""
- Used to represent the SQL where-clause.
+ An SQL WHERE clause.
The class is tied to the Query class that created it (in order to create
the correct SQL).
@@ -29,7 +29,7 @@ class WhereNode(tree.Node):
def split_having(self, negated=False):
"""
- Returns two possibly None nodes: one for those parts of self that
+ Return two possibly None nodes: one for those parts of self that
should be included in the WHERE clause and one for those parts of
self that must be included in the HAVING clause.
"""
@@ -62,9 +62,9 @@ class WhereNode(tree.Node):
def as_sql(self, compiler, connection):
"""
- Returns the SQL version of the where clause and the value to be
- substituted in. Returns '', [] if this node matches everything,
- None, [] if this node is empty, and raises EmptyResultSet if this
+ Return the SQL version of the where clause and the value to be
+ substituted in. Return '', [] if this node matches everything,
+ None, [] if this node is empty, and raise EmptyResultSet if this
node can't match anything.
"""
result = []
@@ -127,7 +127,7 @@ class WhereNode(tree.Node):
def relabel_aliases(self, change_map):
"""
- Relabels the alias values of any children. 'change_map' is a dictionary
+ Relabel the alias values of any children. 'change_map' is a dictionary
mapping old (current) alias values to the new values.
"""
for pos, child in enumerate(self.children):
@@ -139,7 +139,7 @@ class WhereNode(tree.Node):
def clone(self):
"""
- Creates a clone of the tree. Must only be called on root nodes (nodes
+ Create a clone of the tree. Must only be called on root nodes (nodes
with empty subtree_parents). Childs must be either (Contraint, lookup,
value) tuples, or objects supporting .clone().
"""
@@ -173,9 +173,7 @@ class WhereNode(tree.Node):
class NothingNode:
- """
- A node that matches nothing.
- """
+ """A node that matches nothing."""
contains_aggregate = False
def as_sql(self, compiler=None, connection=None):