Apply Python 3 futurize transform libmodernize.fixes.fix_zip.

This commit is contained in:
Tim Abbott
2015-11-01 08:15:11 -08:00
parent f7878a61e1
commit 607eedfc25
3 changed files with 4 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ import pytz
from six.moves import filter from six.moves import filter
from six.moves import map from six.moves import map
from six.moves import range from six.moves import range
from six.moves import zip
eastern_tz = pytz.timezone('US/Eastern') eastern_tz = pytz.timezone('US/Eastern')
def make_table(title, cols, rows, has_row_class=False): def make_table(title, cols, rows, has_row_class=False):
@@ -41,7 +42,7 @@ def dictfetchall(cursor):
"Returns all rows from a cursor as a dict" "Returns all rows from a cursor as a dict"
desc = cursor.description desc = cursor.description
return [ return [
dict(zip([col[0] for col in desc], row)) dict(list(zip([col[0] for col in desc], row)))
for row in cursor.fetchall() for row in cursor.fetchall()
] ]

View File

@@ -13,6 +13,7 @@ import sys
import six import six
from six.moves import input from six.moves import input
from six.moves import range from six.moves import range
from six.moves import zip
if sys.hexversion < 0x02040000: if sys.hexversion < 0x02040000:
# The limiter is the subprocess module # The limiter is the subprocess module
sys.stderr.write("git-p4: requires Python 2.4 or later.\n") sys.stderr.write("git-p4: requires Python 2.4 or later.\n")

View File

@@ -23,6 +23,7 @@ import base64
import logging import logging
import cProfile import cProfile
from zerver.lib.mandrill_client import get_mandrill_client from zerver.lib.mandrill_client import get_mandrill_client
from six.moves import zip
if settings.ZULIP_COM: if settings.ZULIP_COM:
from zilencer.models import get_deployment_by_domain, Deployment from zilencer.models import get_deployment_by_domain, Deployment