# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-yapf VERSION= 0.40.1 KEYWORDS= python VARIANTS= py310 v11 SDESC[py310]= Formatter for Python code (3.10) SDESC[v11]= Formatter for Python code (3.11) HOMEPAGE= https://github.com/google/yapf CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/23/75/c374517c09e31bf22d3b3f156d73e0f38d08e29b2afdd607cef5f1e10aa9 DISTFILE[1]= yapf-0.40.1-py3-none-any.whl:main DF_INDEX= 1 SPKGS[py310]= single SPKGS[v11]= single OPTIONS_AVAILABLE= PY310 PY311 OPTIONS_STANDARD= none VOPTS[py310]= PY310=ON PY311=OFF VOPTS[v11]= PY310=OFF PY311=ON DISTNAME= yapf-0.40.1.dist-info GENERATED= yes [PY310].RUN_DEPENDS_ON= python-importlib-metadata:single:py310 python-platformdirs:single:py310 python-tomli:single:py310 [PY310].USES_ON= python:py310,wheel [PY311].RUN_DEPENDS_ON= python-importlib-metadata:single:v11 python-platformdirs:single:v11 python-tomli:single:v11 [PY311].USES_ON= python:v11,wheel [FILE:2624:descriptions/desc.single] ==== YAPF ==== :alt: PyPI version :alt: Build status :alt: Run pre-commit :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:: shell $ pip install yapf 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:: shell $ PYTHONPATH=DIR python DIR/yapf [options] ... Python versions =============== YAPF supports Python 3.7+. YAPF requires the code it formats to be valid Python for the version YAPF itself runs under. So if formatting 3.7 Python run YAPF under 3.7 Usage ===== Options:: usage: yapf [-h] [-v] [-d | -i | -q] [-r | -l START-END] [-e PATTERN] [--style STYLE] [--style-help] [--no-local-style] [-p] [-vv] [files ...] Formatter for Python code. positional arguments: files reads from stdin when no files are specified. optional arguments: [FILE:107:distinfo] b8bfc1f280949153e795181768ca14ef43d7312629a06c43e7abd279323af313 250316 yapf-0.40.1-py3-none-any.whl