Home
last modified time | relevance | path

Searched refs:uwlines (Results 1 – 18 of 18) sorted by relevance

/external/yapf/yapftests/
Dreformatter_buganizer_test.py38 uwlines = yapf_test_helper.ParseAndUnwrap(code)
39 self.assertCodeEqual(code, reformatter.Reformat(uwlines))
56 uwlines = yapf_test_helper.ParseAndUnwrap(code)
57 self.assertCodeEqual(code, reformatter.Reformat(uwlines))
75 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
76 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
102 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
103 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
119 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
120 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
[all …]
Dreformatter_basic_test.py56 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
57 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
69 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
70 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
77 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
78 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
106 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
107 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
121 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
122 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
[all …]
Dpytree_unwrapper_test.py26 def _CheckUnwrappedLines(self, uwlines, list_of_expected): argument
35 for uwl in uwlines:
51 uwlines = yapf_test_helper.ParseAndUnwrap(code)
52 self._CheckUnwrappedLines(uwlines, [
63 uwlines = yapf_test_helper.ParseAndUnwrap(code)
64 self._CheckUnwrappedLines(uwlines, [
73 uwlines = yapf_test_helper.ParseAndUnwrap(code)
74 self._CheckUnwrappedLines(uwlines, [
85 uwlines = yapf_test_helper.ParseAndUnwrap(code)
86 self._CheckUnwrappedLines(uwlines, [
[all …]
Dreformatter_facebook_test.py41 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
42 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
57 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
58 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
73 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
74 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
94 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
95 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
106 uwlines = yapf_test_helper.ParseAndUnwrap(code)
107 self.assertCodeEqual(code, reformatter.Reformat(uwlines))
[all …]
Dreformatter_pep8_test.py40 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
41 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
49 uwlines = yapf_test_helper.ParseAndUnwrap(code)
50 self.assertCodeEqual(code, reformatter.Reformat(uwlines))
64 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
65 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
76 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
77 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
88 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
89 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
[all …]
Dreformatter_python3_test.py47 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
48 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
59 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
60 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
76 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
77 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
88 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
89 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
94 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
95 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
[all …]
Dblank_line_calculator_test.py44 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
45 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
80 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
81 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
125 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
126 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
191 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
192 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
202 uwlines = yapf_test_helper.ParseAndUnwrap(code)
203 self.assertCodeEqual(code, reformatter.Reformat(uwlines))
[all …]
Dreformatter_verify_test.py39 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
41 reformatter.Reformat(uwlines, verify=True)
42 reformatter.Reformat(uwlines) # verify should be False by default.
53 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
55 reformatter.Reformat(uwlines, verify=False))
67 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
69 reformatter.Reformat(uwlines, verify=True)
82 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
84 reformatter.Reformat(uwlines, verify=False))
102 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
[all …]
Dsubtype_assigner_test.py27 def _CheckFormatTokenSubtypes(self, uwlines, list_of_expected): argument
36 for uwl in uwlines:
50 uwlines = yapf_test_helper.ParseAndUnwrap(code)
51 self._CheckFormatTokenSubtypes(uwlines, [
86 uwlines = yapf_test_helper.ParseAndUnwrap(code)
87 self._CheckFormatTokenSubtypes(uwlines, [
105 uwlines = yapf_test_helper.ParseAndUnwrap(code)
106 self._CheckFormatTokenSubtypes(uwlines, [
132 uwlines = yapf_test_helper.ParseAndUnwrap(code)
133 self._CheckFormatTokenSubtypes(uwlines, [
[all …]
Dreformatter_style_config_test.py41 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
43 reformatter.Reformat(uwlines))
56 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
57 self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
72 uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
74 reformatter.Reformat(uwlines))
Dyapf_test_helper.py85 uwlines = pytree_unwrapper.UnwrapPyTree(tree)
86 for uwl in uwlines:
89 return uwlines
Dformat_decision_state_test.py38 uwlines = yapf_test_helper.ParseAndUnwrap(code)
39 uwline = unwrapped_line.UnwrappedLine(0, _FilterLine(uwlines[0]))
92 uwlines = yapf_test_helper.ParseAndUnwrap(code)
93 uwline = unwrapped_line.UnwrappedLine(0, _FilterLine(uwlines[0]))
Dunwrapped_line_test.py71 uwlines = yapf_test_helper.ParseAndUnwrap(code)
73 f = uwlines[0].tokens[1]
78 lparen = uwlines[0].tokens[2]
Dline_joiner_test.py38 uwlines = yapf_test_helper.ParseAndUnwrap(code)
39 self.assertCodeEqual(line_joiner.CanMergeMultipleLines(uwlines), join_lines)
/external/yapf/yapf/yapflib/
Dyapf_api.py142 uwlines = pytree_unwrapper.UnwrapPyTree(tree)
143 for uwl in uwlines:
147 _MarkLinesToFormat(uwlines, lines)
149 _SplitSemicolons(uwlines), verify, lines)
207 def _SplitSemicolons(uwlines): argument
209 for uwline in uwlines:
231 def _MarkLinesToFormat(uwlines, lines): argument
234 for uwline in uwlines:
241 while index < len(uwlines):
242 uwline = uwlines[index]
[all …]
Dreformatter.py39 def Reformat(uwlines, verify=False, lines=None): argument
55 for uwline in _SingleOrMergedLines(uwlines):
545 def _SingleOrMergedLines(uwlines): argument
557 while index < len(uwlines):
558 if uwlines[index].disable:
559 uwline = uwlines[index]
561 while index < len(uwlines):
563 if uwlines[index].lineno != uwline.lineno:
569 for tok in uwlines[index].tokens:
573 elif line_joiner.CanMergeMultipleLines(uwlines[index:], last_was_merged):
[all …]
Dunwrapped_line.py93 uwlines = []
97 uwlines.append(uwline)
103 uwlines.append(uwline)
105 for uwline in uwlines:
111 return uwlines
Dpytree_unwrapper.py52 uwlines = unwrapper.GetUnwrappedLines()
53 uwlines.sort(key=lambda x: x.lineno)
54 return uwlines