1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #23968 -- Replaced list comprehension with generators and dict comprehension

This commit is contained in:
Jon Dufresne
2014-12-06 13:00:09 -08:00
committed by Tim Graham
parent b327a614eb
commit 4468c08d70
65 changed files with 169 additions and 169 deletions

View File

@@ -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):