1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
6 VARIANTS= py38 py37 py27
7 SDESC[py37]= Formatter for Python code (PY37)
8 SDESC[py38]= Formatter for Python code (PY38)
9 SDESC[py27]= Formatter for Python code (PY27)
11 CONTACT= Python_Automaton[python@ironwolf.systems]
14 SITES[main]= PYPI/y/yapf
15 DISTFILE[1]= yapf-0.29.0.tar.gz:main
21 OPTIONS_AVAILABLE= PY38 PY37 PY27
22 OPTIONS_STANDARD= none
23 VOPTS[py37]= PY38=OFF PY37=ON PY27=OFF
24 VOPTS[py38]= PY38=ON PY37=OFF PY27=OFF
25 VOPTS[py27]= PY38=OFF PY37=OFF PY27=ON
31 [PY37].USES_ON= python:py37
33 [PY38].USES_ON= python:py38
35 [PY27].USES_ON= python:py27
37 [FILE:2641:descriptions/desc.single]
51 Most of the current formatters for Python --- e.g., autopep8, and pep8ify
53 are made to remove lint errors from code. This has some obvious
55 For instance, code that conforms to the PEP 8 guidelines may not be
56 reformatted. But it doesn't mean that the code looks good.
58 YAPF takes a different approach. It's based off of `'clang-format'
60 ang.llvm.org/docs/ClangFormat.html>`_, developed by Daniel Jasper. In
62 the algorithm takes the code and reformats it to the best formatting that
63 conforms to the style guide, even if the original code didn't violate the
64 style guide. The idea is also similar to the ['gofmt'] tool for the Go
65 programming language: end all holy wars about
66 formatting - if the whole codebase of a project is simply piped through
68 whenever modifications are made, the style remains consistent throughout
70 project and there's no point arguing about style in every code review.
72 The ultimate goal is that the code YAPF produces is as good as the code
74 programmer would write if they were following the style guide. It takes
76 some of the drudgery of maintaining your code.
78 Try out YAPF with this [online demo].
82 YAPF is not an official Google product (experimental or otherwise), it
84 just code that happens to be owned by Google.
91 To install YAPF from PyPI:
97 (optional) If you are using Python 2.7 and want to enable multiprocessing:
101 $ pip install futures
103 YAPF is still considered in "alpha" stage, and the released version may
105 often; therefore, the best way to keep up-to-date with the latest
107 is to clone this repository.
109 Note that if you intend to use YAPF as a command-line tool rather than as a
110 library, installation is not necessary. YAPF supports being run as a
112 by the Python interpreter. If you cloned/unzipped YAPF into DIR, it's
115 .. code-block:: shell
117 $ PYTHONPATH=DIR python DIR/yapf [options] ...
122 YAPF supports Python 2.7 and 3.6.4+. (Note that some Python 3 features may
124 to parse with Python versions before 3.6.4.)
126 YAPF requires the code it formats to be valid Python for the version YAPF
128 runs under. Therefore, if you format Python 3 code with YAPF, run YAPF
130 under Python 3 (and similarly for Python 2).
137 usage: yapf [-h] [-v] [-d | -i] [-r | -l START-END] [-e PATTERN]
141 712e23c468506bf12cadd10169f852572ecc61b266258422d45aaf4ad7ef43de 181836 yapf-0.29.0.tar.gz