Home
last modified time | relevance | path

Searched refs:FormatCode (Results 1 – 6 of 6) sorted by relevance

/external/yapf/yapftests/
Dblank_line_calculator_test.py312 code, changed = yapf_api.FormatCode(
346 code, changed = yapf_api.FormatCode(unformatted_code, lines=[(6, 7)])
380 code, changed = yapf_api.FormatCode(unformatted_code, lines=[(5, 9)])
416 code, changed = yapf_api.FormatCode(unformatted_code, lines=[(6, 9)])
Dyapf_test.py46 formatted_code, _ = yapf_api.FormatCode(
1566 self.assertRaises(errors.YapfError, yapf_api.FormatCode, code)
1570 self.assertRaises(errors.YapfError, yapf_api.FormatCode, code)
1583 formatted_code, _ = yapf_api.FormatCode(
1612 formatted_code, _ = yapf_api.FormatCode(
1890 formatted_code, _ = yapf_api.FormatCode(
/external/yapf/yapf/yapflib/
Dyapf_api.py96 reformatted_source, changed = FormatCode(
154 def FormatCode(unformatted_source, function
/external/yapf/
DREADME.rst276 The two main APIs for calling yapf are ``FormatCode`` and ``FormatFile``, these
281 >>> from yapf.yapflib.yapf_api import FormatCode # reformat a string of code
283 >>> formatted_code, changed = FormatCode("f ( a = 1, b = 2 )")
295 >>> FormatCode("def g():\n return True", style_config='pep8')[0]
305 >>> FormatCode("def g( ):\n a=1\n b = 2\n return a==b", lines=[(1, 1), (2, 3)])[0]
313 >>> print(FormatCode("a==b", filename="foo.py", print_diff=True)[0])
320 Note: the ``filename`` argument for ``FormatCode`` is what is inserted into
DCHANGELOG495 `yapf_api.FormatCode` was called, the style set by the first call would be
/external/yapf/yapf/
D__init__.py100 reformatted_source, _ = yapf_api.FormatCode(