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/postgresql/introspection.py | |
parent | d6e26e5b7c8063c2cc5aa045edea6555bf358fc2 (diff) | |
download | django-60e52a047e55bc4cd5a93a8bd4d07baed27e9a22.tar.gz |
Refs #27656 -- Updated django.db docstring verbs according to PEP 257.
Diffstat (limited to 'django/db/backends/postgresql/introspection.py')
-rw-r--r-- | django/db/backends/postgresql/introspection.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/django/db/backends/postgresql/introspection.py b/django/db/backends/postgresql/introspection.py index d50f6eb9c2..7e7091a613 100644 --- a/django/db/backends/postgresql/introspection.py +++ b/django/db/backends/postgresql/introspection.py @@ -53,9 +53,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): return field_type def get_table_list(self, cursor): - """ - Returns a list of table and view names in the current database. - """ + """Return a list of table and view names in the current database.""" cursor.execute(""" SELECT c.relname, c.relkind FROM pg_catalog.pg_class c @@ -68,7 +66,10 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): if row[0] not in self.ignored_tables] def get_table_description(self, cursor, table_name): - "Returns a description of the table, with the DB-API cursor.description interface." + """ + Return a description of the table with the DB-API cursor.description + interface. + """ # As cursor.description does not return reliably the nullable property, # we have to query the information_schema (#7783) cursor.execute(""" @@ -87,7 +88,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): def get_relations(self, cursor, table_name): """ - Returns a dictionary of {field_name: (field_name_other_table, other_table)} + Return a dictionary of {field_name: (field_name_other_table, other_table)} representing all relationships to the given table. """ cursor.execute(""" |