Skip to content

Commit 59056e6

Browse files
committed
Remove some false alarms on checks for ambiguous fixer names with futurize -f ... (issue #56)
1 parent 0546d70 commit 59056e6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/whatsnew.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ What's new in version 0.12.3
1111
classifiers and Travis-CI tests are now also run on Py3.4 (issue #67).
1212
- Add ``--version`` option for ``futurize`` and ``pasteurize`` scripts
1313
(issue #57).
14+
1415
- Fix ``future.utils.ensure_new_type`` with ``long`` input (issue #65).
16+
17+
- Remove some false alarms on checks for ambiguous fixer names with
18+
``futurize -f ...``.
19+
1520
- Testing fixes:
1621
- Don't hard-code Python interpreter command in tests (issue #62).
1722
- Fix deprecated ``unittest`` usage in Py3 (also issue #62).

libfuturize/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ def main(args=None):
246246
# Infer the full module name for the fixer.
247247
# First ensure that no names clash (e.g.
248248
# lib2to3.fixes.fix_blah and libfuturize.fixes.fix_blah):
249-
found = [f for f in avail_fixes if 'fix_{}'.format(fix) in f]
249+
found = [f for f in avail_fixes
250+
if f.endswith('fix_{}'.format(fix))]
250251
if len(found) > 1:
251252
print("Ambiguous fixer name. Choose a fully qualified "
252253
"module name instead from these:\n" +

0 commit comments

Comments
 (0)