Apply Python 3 futurize transform libmodernize.fixes.fix_xrange_six.

This commit is contained in:
Tim Abbott 2015-11-01 08:15:05 -08:00
parent 3cfe157299
commit c5e2995b6e
3 changed files with 6 additions and 2 deletions

View file

@ -24,6 +24,7 @@ from __future__ import absolute_import
import sys import sys
from six.moves import map from six.moves import map
from six.moves import range
try: try:
import simplejson import simplejson
except ImportError: except ImportError:
@ -44,7 +45,7 @@ import select
DEFAULT_SITE = "https://api.zulip.com" DEFAULT_SITE = "https://api.zulip.com"
class States: class States:
Startup, ZulipToZephyr, ZephyrToZulip, ChildSending = range(4) Startup, ZulipToZephyr, ZephyrToZulip, ChildSending = list(range(4))
CURRENT_STATE = States.Startup CURRENT_STATE = States.Startup
def to_zulip_username(zephyr_username): def to_zulip_username(zephyr_username):

View file

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Zulip hook for Mercurial changeset pushes. # Zulip hook for Mercurial changeset pushes.
# Copyright © 2012-2014 Zulip, Inc. # Copyright © 2012-2014 Zulip, Inc.
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
@ -25,8 +25,10 @@
# #
# This hook is called when changesets are pushed to the master repository (ie # This hook is called when changesets are pushed to the master repository (ie
# `hg push`). See https://zulip.com/integrations for installation instructions. # `hg push`). See https://zulip.com/integrations for installation instructions.
from __future__ import absolute_import
import zulip import zulip
from six.moves import range
VERSION = "0.9" VERSION = "0.9"

View file

@ -12,6 +12,7 @@ from __future__ import absolute_import
import sys import sys
import six import six
from six.moves import input from six.moves import input
from six.moves import range
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")