Skip to content

Commit 8e0fd5d

Browse files
committed
Merge branch 'issue_103' into v0.13.x
2 parents f8b385c + 143578b commit 8e0fd5d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

libfuturize/fixes/fix_absolute_import.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
If spam is being imported from the local directory, this import:
88
from spam import eggs
99
becomes:
10+
from __future__ import absolute_import
1011
from .spam import eggs
1112
1213
and this import:
1314
import spam
1415
becomes:
16+
from __future__ import absolute_import
1517
from . import spam
1618
"""
1719

libfuturize/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ def main(args=None):
100100
help="Report the version number of futurize")
101101
parser.add_option("-a", "--all-imports", action="store_true",
102102
help="Add all __future__ and future imports to each module")
103-
parser.add_option("-d", "--doctests_only", action="store_true",
104-
help="Fix up doctests only")
105103
parser.add_option("-1", "--stage1", action="store_true",
106104
help="Modernize Python 2 code only; no compatibility with Python 3 (or dependency on ``future``)")
107105
parser.add_option("-2", "--stage2", action="store_true",
@@ -281,6 +279,7 @@ def main(args=None):
281279
'output_dir': options.output_dir,
282280
'input_base_dir': input_base_dir,
283281
}
282+
284283
rt = StdoutRefactoringTool(
285284
sorted(fixer_names), flags, sorted(explicit),
286285
options.nobackups, not options.no_diffs,
@@ -292,7 +291,7 @@ def main(args=None):
292291
rt.refactor_stdin()
293292
else:
294293
try:
295-
rt.refactor(args, options.write, options.doctests_only,
294+
rt.refactor(args, options.write, None,
296295
options.processes)
297296
except refactor.MultiprocessingUnsupported:
298297
assert options.processes > 1

libpasteurize/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ def main(args=None):
6161
help="Report the version number of pasteurize")
6262
parser.add_option("-a", "--all-imports", action="store_true",
6363
help="Adds all __future__ and future imports to each module")
64-
parser.add_option("-d", "--doctests_only", action="store_true",
65-
help="Fix up doctests only")
6664
parser.add_option("-f", "--fix", action="append", default=[],
6765
help="Each FIX specifies a transformation; default: all")
6866
parser.add_option("-j", "--processes", action="store", default=1,
@@ -139,7 +137,7 @@ def main(args=None):
139137
rt.refactor_stdin()
140138
else:
141139
try:
142-
rt.refactor(args, options.write, options.doctests_only,
140+
rt.refactor(args, options.write, None,
143141
options.processes)
144142
except refactor.MultiprocessingUnsupported:
145143
assert options.processes > 1

0 commit comments

Comments
 (0)