summaryrefslogtreecommitdiff
path: root/tests/schema
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2014-12-06 13:00:09 -0800
committerTim Graham <timograham@gmail.com>2014-12-08 07:58:23 -0500
commit4468c08d70b5b722f3ebd4872909e56580ec7d68 (patch)
tree3da12d757bc9b586df4ba39da20b8793abcae76e /tests/schema
parentb327a614eb7d885441c6a2575e10b70ac1352aae (diff)
Fixed #23968 -- Replaced list comprehension with generators and dict comprehension
Diffstat (limited to 'tests/schema')
-rw-r--r--tests/schema/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/schema/tests.py b/tests/schema/tests.py
index 730af87abf..4e11c2696a 100644
--- a/tests/schema/tests.py
+++ b/tests/schema/tests.py
@@ -64,13 +64,13 @@ class SchemaTests(TransactionTestCase):
def column_classes(self, model):
with connection.cursor() as cursor:
- columns = dict(
- (d[0], (connection.introspection.get_field_type(d[1], d), d))
+ columns = {
+ d[0]: (connection.introspection.get_field_type(d[1], d), d)
for d in connection.introspection.get_table_description(
cursor,
model._meta.db_table,
)
- )
+ }
# SQLite has a different format for field_type
for name, (type, desc) in columns.items():
if isinstance(type, tuple):