diff options
| author | Anton Samarchyan <anton.samarchyan@savoirfairelinux.com> | 2017-01-24 18:04:12 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-02-28 09:17:27 -0500 |
| commit | 60e52a047e55bc4cd5a93a8bd4d07baed27e9a22 (patch) | |
| tree | 010a363968b1ed41adf2e64c98d572d7148a2a5e /django/db/backends/sqlite3/base.py | |
| parent | d6e26e5b7c8063c2cc5aa045edea6555bf358fc2 (diff) | |
Refs #27656 -- Updated django.db docstring verbs according to PEP 257.
Diffstat (limited to 'django/db/backends/sqlite3/base.py')
| -rw-r--r-- | django/db/backends/sqlite3/base.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index 97ddaa084d..c234a382ca 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -27,9 +27,8 @@ from .schema import DatabaseSchemaEditor # isort:skip def decoder(conv_func): - """ The Python sqlite3 interface returns always byte strings. - This function converts the received value to a regular string before - passing it to the receiver function. + """ + Convert bytestrings from Python's sqlite3 interface to a regular string. """ return lambda s: conv_func(s.decode()) @@ -215,14 +214,14 @@ class DatabaseWrapper(BaseDatabaseWrapper): def check_constraints(self, table_names=None): """ - Checks each table name in `table_names` for rows with invalid foreign + Check each table name in `table_names` for rows with invalid foreign key references. This method is intended to be used in conjunction with `disable_constraint_checking()` and `enable_constraint_checking()`, to determine if rows with invalid references were entered while constraint checks were off. - Raises an IntegrityError on the first invalid foreign key reference - encountered (if any) and provides detailed information about the + Raise an IntegrityError on the first invalid foreign key reference + encountered (if any) and provide detailed information about the invalid reference in the error message. Backends can override this method if they can more directly apply @@ -409,9 +408,9 @@ def _sqlite_time_extract(lookup_type, dt): def _sqlite_format_dtdelta(conn, lhs, rhs): """ LHS and RHS can be either: - - An integer number of microseconds - - A string representing a timedelta object - - A string representing a datetime + - An integer number of microseconds + - A string representing a timedelta object + - A string representing a datetime """ try: if isinstance(lhs, int): |
