Skip to content

Commit

Permalink
Merge pull request #601 from bryant1410/patch-3
Browse files Browse the repository at this point in the history
Remove unnecessary lists creation
  • Loading branch information
James McKinney committed Apr 11, 2016
2 parents 27d817e + 2cd2b22 commit ffe5f44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions csvkit/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def make_column(column, no_constraints=False):
if column.type in column_types:
sql_column_type = column_types[column.type]
elif column.type is int:
column_max = max([v for v in column if v is not None])
column_min = min([v for v in column if v is not None])
column_max = max(v for v in column if v is not None)
column_min = min(v for v in column if v is not None)

if column_max > SQL_INTEGER_MAX or column_min < SQL_INTEGER_MIN:
sql_column_type = BigInteger
Expand Down

0 comments on commit ffe5f44

Please sign in to comment.