Home
last modified time | relevance | path

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

/external/yapf/yapftests/
Dblank_line_calculator_test.py315 code, changed = yapf_api.FormatCode(
349 code, changed = yapf_api.FormatCode(unformatted_code, lines=[(6, 7)])
Dyapf_test.py42 formatted_code, _ = yapf_api.FormatCode(
1363 self.assertRaises(SyntaxError, yapf_api.FormatCode, code)
1376 formatted_code, _ = yapf_api.FormatCode(
/external/yapf/yapf/yapflib/
Dyapf_api.py85 reformatted_source, changed = FormatCode(
104 def FormatCode(unformatted_source, function
/external/yapf/
DREADME.rst235 The two main APIs for calling yapf are ``FormatCode`` and ``FormatFile``, these
240 >>> from yapf.yapflib.yapf_api import FormatCode # reformat a string of code
242 >>> FormatCode("f ( a = 1, b = 2 )")
251 >>> FormatCode("def g():\n return True", style_config='pep8')
261 >>> FormatCode("def g( ):\n a=1\n b = 2\n return a==b", lines=[(1, 1), (2, 3)])
269 >>> print(FormatCode("a==b", filename="foo.py", print_diff=True))
276 Note: the ``filename`` argument for ``FormatCode`` is what is inserted into
DCHANGELOG287 `yapf_api.FormatCode` was called, the style set by the first call would be
/external/yapf/yapf/
D__init__.py179 reformatted_source, _ = yapf_api.FormatCode(