/external/yapf/yapftests/ |
D | reformatter_buganizer_test.py | 38 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 …]
|
D | reformatter_basic_test.py | 56 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 …]
|
D | pytree_unwrapper_test.py | 26 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 …]
|
D | reformatter_facebook_test.py | 41 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 …]
|
D | reformatter_pep8_test.py | 40 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 …]
|
D | reformatter_python3_test.py | 47 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 …]
|
D | blank_line_calculator_test.py | 44 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 …]
|
D | reformatter_verify_test.py | 39 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 …]
|
D | subtype_assigner_test.py | 27 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 …]
|
D | reformatter_style_config_test.py | 41 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))
|
D | yapf_test_helper.py | 85 uwlines = pytree_unwrapper.UnwrapPyTree(tree) 86 for uwl in uwlines: 89 return uwlines
|
D | format_decision_state_test.py | 38 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]))
|
D | unwrapped_line_test.py | 71 uwlines = yapf_test_helper.ParseAndUnwrap(code) 73 f = uwlines[0].tokens[1] 78 lparen = uwlines[0].tokens[2]
|
D | line_joiner_test.py | 38 uwlines = yapf_test_helper.ParseAndUnwrap(code) 39 self.assertCodeEqual(line_joiner.CanMergeMultipleLines(uwlines), join_lines)
|
/external/yapf/yapf/yapflib/ |
D | yapf_api.py | 142 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 …]
|
D | reformatter.py | 39 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 …]
|
D | unwrapped_line.py | 93 uwlines = [] 97 uwlines.append(uwline) 103 uwlines.append(uwline) 105 for uwline in uwlines: 111 return uwlines
|
D | pytree_unwrapper.py | 52 uwlines = unwrapper.GetUnwrappedLines() 53 uwlines.sort(key=lambda x: x.lineno) 54 return uwlines
|