Maintainer Mode
Sign in with GitHub
Work in progress. Maintainer Mode changes every day: pages, numbers and links can change or break. Tell us what is wrong or missing.
Sign in to subscribe
Health
Risk
risk 0 ok
Version
0.43.0 no newer release known to repology
Channels
master 0.43.0 · nixos-unstable 0.43.0 · nixos-26.05 0.43.0 no channel is behind master
Hydra
succeeded 2d ago
Advisories
none open
Packaging
meta complete
Description
Yet Another Python Formatter
Long description
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.
License
Platforms
31 platforms: Linux, Darwin
Main program
yapf
Source provenance
not set: built from source
Outputs
out dist
Status
not broken, not insecure, free
Maintainers
Version bumps 0all open bumps
None open.
Pull requests 0
None open.
Issues 0
None open.