Port variant py39
Summary Formatter for Python code (3.9)
Package version 0.32.0
Homepage No known homepage
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants py310
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 01 JAN 2022, 00:13:39 UTC
Port created 17 JUL 2017, 16:13:54 UTC
Subpackage Descriptions
single ==== YAPF ==== :alt: PyPI version :alt: Build status :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 (optional) If you are using Python 2.7 and want to enable multiprocessing: .. code-block:: shell $ 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:: shell $ PYTHONPATH=DIR python DIR/yapf [options] ... Python versions =============== YAPF supports Python 2.7 and 3.6.4+. (Note that some Python 3 features may fail to parse with Python versions before 3.6.4.) 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] [-vv]
Configuration Switches (platform-specific settings discarded)
PY310 OFF Build using Python 3.10 PY39 ON Build using Python 3.9
Package Dependencies by Type
Build (only) python-pip:single:py39
Build and Runtime python39:single:standard
Download groups
main mirror://PYPIWHL/47/88/843c2e68f18a5879b4fbf37cb99fbabe1ffc4343b2e63191c8462235c008
Distribution File Information
8fea849025584e486fd06d6ba2bed717f396080fd3cc236ba10cb97c4c51cf32 190236 yapf-0.32.0-py2.py3-none-any.whl
Ports that require python-yapf:py39
No other ports depend on this one.