Permalink
Browse files

Also support xrange

  • Loading branch information...
1 parent 17af340 commit 5e8b64673e450506adf9915c9543e8d2f9774232 @mitsuhiko mitsuhiko committed Feb 4, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 libmodernize/fixes/fix_range.py
@@ -11,7 +11,7 @@ class FixRange(fixer_base.BaseFix):
order = "pre"
PATTERN = """
- power< 'range'
+ power< name='range'|'xrange'
trailer< '('
arglist< (
(not(argument<any '=' any>) any ','
@@ -30,3 +30,4 @@ class FixRange(fixer_base.BaseFix):
def transform(self, node, results):
touch_import(u'six.moves', u'range', node)
+ results['name'][0].value = 'range'

0 comments on commit 5e8b646

Please sign in to comment.