# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-yapf VERSION= 0.17.0 KEYWORDS= python devel VARIANTS= py27 py35 py36 SDESC[py35]= Formatter for Python code. (PY 35) SDESC[py36]= Formatter for Python code. (PY 36) SDESC[py27]= Formatter for Python code. (PY 27) HOMEPAGE= none CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPI/y/yapf DISTFILE[1]= yapf-0.17.0.tar.gz:main DF_INDEX= 1 SPKGS[py35]= single SPKGS[py36]= single SPKGS[py27]= single OPTIONS_AVAILABLE= PY27 PY35 PY36 OPTIONS_STANDARD= none VOPTS[py35]= PY27=OFF PY35=ON PY36=OFF VOPTS[py36]= PY27=OFF PY35=OFF PY36=ON VOPTS[py27]= PY27=ON PY35=OFF PY36=OFF DISTNAME= yapf-0.17.0 LICENSE_SCHEME= solo GENERATED= yes [PY35].USES_ON= python:py35 [PY36].USES_ON= python:py36 [PY27].USES_ON= python:py27 [FILE:2987:descriptions/desc.single] ==== YAPF ==== .. image:: https://badge.fury.io/py/yapf.svg :target: http://badge.fury.io/py/yapf :alt: PyPI version .. image:: https://travis-ci.org/google/yapf.svg?branch=master :target: https://travis-ci.org/google/yapf :alt: Build status .. image:: https://coveralls.io/repos/google/yapf/badge.svg?branch=master :target: https://coveralls.io/r/google/yapf?branch=master :alt: Coverage status Introduction ============ Most of the current formatters for Python --- e.g., autopep8, and pep8ify --- are made to remove lint errors from code. This has some obvious limitations. For instance, code that conforms to the PEP 8 guidelines may not be reformatted. But it doesn't mean that the code looks good. YAPF takes a different approach. It's based off of 'clang-format', developed by Daniel Jasper. In essence, the algorithm takes the code and reformats it to the best formatting that conforms to the style guide, even if the original code didn't violate the style guide. The idea is also similar to the 'gofmt' tool for the Go programming language: end all holy wars about formatting - if the whole codebase of a project is simply piped through YAPF whenever modifications are made, the style remains consistent throughout the project and there's no point arguing about style in every code review. The ultimate goal is that the code YAPF produces is as good as the code that a programmer would write if they were following the style guide. It takes away some of the drudgery of maintaining your code. .. footer:: YAPF is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google. .. contents:: Installation ============ To install YAPF from PyPI: .. code-block:: $ pip install yapf (optional) If you are using Python 2.7 and want to enable multiprocessing: .. code-block:: $ pip install futures YAPF is still considered in "alpha" stage, and the released version may change often; therefore, the best way to keep up-to-date with the latest development is to clone this repository. Note that if you intend to use YAPF as a command-line tool rather than as a library, installation is not necessary. YAPF supports being run as a directory by the Python interpreter. If you cloned/unzipped YAPF into ``DIR``, it's possible to run: .. code-block:: $ PYTHONPATH=DIR python DIR/yapf [options] ... Python versions =============== YAPF supports Python 2.7 and 3.4.1+. YAPF requires the code it formats to be valid Python for the version YAPF itself runs under. Therefore, if you format Python 3 code with YAPF, run YAPF itself under Python 3 (and similarly for Python 2). Usage ===== Options:: usage: yapf [-h] [-v] [-d | -i] [-r | -l START-END] [-e PATTERN] [--style STYLE] [--style-help] [--no-local-style] [-p] [files [files ...]] Formatter for Python code. positional arguments: files optional arguments: [FILE:97:distinfo] 5472f4c95ab9b9fe9f5bf74ece3c986bfafa1f98ad9e1e296d4c35d291c97856 116736 yapf-0.17.0.tar.gz