Home
last modified time | relevance | path

Searched refs:fixers (Results 1 – 7 of 7) sorted by relevance

/third_party/python/Lib/lib2to3/tests/
Dsupport.py37 def get_refactorer(fixer_pkg="lib2to3", fixers=None, options=None): argument
45 if fixers is not None:
46 fixers = [fixer_pkg + ".fixes.fix_" + fix for fix in fixers]
48 fixers = refactor.get_fixers_from_package(fixer_pkg + ".fixes")
50 return refactor.RefactoringTool(fixers, options, explicit=True)
Dtest_refactor.py42 def rt(self, options=None, fixers=_DEFAULT_FIXERS, explicit=None): argument
43 return refactor.RefactoringTool(fixers, options, explicit)
150 self.assertRaises(ImportError, self.rt, fixers=["not_here"])
151 self.assertRaises(refactor.FixerError, self.rt, fixers=["no_fixer_cls"])
152 self.assertRaises(refactor.FixerError, self.rt, fixers=["bad_order"])
184 def check_file_refactoring(self, test_file, fixers=_2TO3_FIXERS, argument
189 rt = self.rt(fixers=fixers, options=options)
215 def refactor_file(self, test_file, fixers=_2TO3_FIXERS): argument
218 rt = self.rt(fixers=fixers)
232 self.check_file_refactoring(test_file, fixers=(),
[all …]
/third_party/python/Lib/lib2to3/
Dbtm_matcher.py22 self.fixers = []
34 self.fixers = []
42 self.fixers.append(fixer)
47 match_node.fixers.append(fixer)
119 for fixer in current_ac_node.fixers:
133 for fixer in current_ac_node.fixers:
146 (node.id, subnode.id, type_repr(subnode_key), str(subnode.fixers)))
Drefactor.py172 self.fixers = fixer_names
229 for fix_mod_path in self.fixers:
417 for fixer in self.BM.fixers:
469 def traverse_by(self, fixers, traversal): argument
481 if not fixers:
484 for fixer in fixers[node.type]:
Dmain.py36 def __init__(self, fixers, options, explicit, nobackups, show_diffs, argument
63 super(StdoutRefactoringTool, self).__init__(fixers, options, explicit)
/third_party/python/Doc/library/
D2to3.rst9 of *fixers* to transform it into valid Python 3.x code. The standard library
10 contains a rich set of fixers that will handle almost all code. 2to3 supporting
12 possible to write your own fixers for 2to3.
59 By default, 2to3 runs a set of :ref:`predefined fixers <2to3-fixers>`. The
60 :option:`!-l` flag lists all available fixers. An explicit set of fixers to run
62 fixer. The following example runs only the ``imports`` and ``has_key`` fixers:
74 Some fixers are *explicit*, meaning they aren't run by default and must be
75 listed on the command line to be run. Here, in addition to the default fixers,
82 Notice how passing ``all`` enables all default fixers.
102 :option:`!-p` to run fixers on code that already has had its print statements
[all …]
/third_party/python/
DMakefile.pre.in1459 lib2to3/tests/data/fixers \
1460 lib2to3/tests/data/fixers/myfixes \