# Friendly autopep8
A wrapper around [autopep8] which rums it only on non commited lines. I.E run git-diff between the worktree and this index and apply autopep8 only to there.
## Usage
### Commandline:
` $ friendlyautopep8 skip only deleted lines autopep8 --in-place --line-range 23 38 ./friendlyautopep8/__init__.py autopep8 --in-place --line-range 11 19 ./friendlyautopep8/__init__.py `
` $ friendlyautopep8 HEAD~13 autopep8 --in-place --line-range 12 78 ./friendlyautopep8/__init__.py autopep8 --in-place --line-range 81 134 ./friendlyautopep8/__init__.py `
### progrmatic:
`python from friendlypep8 import run_on_cwd run_on_cwd(commmitish_or_None): `
## Why ?
Because autopep8 is nice but [“There must be a better way”](https://www.youtube.com/watch?v=wf-BqAjZb8M). (Highly recommended to watch).
Applying autopep8 (or even fixing manually) can break tools like git blame.
Extra changes (in whitespace, indent….) can distract reviewer from their tasks.
The fix is simple, pep-8 (or should I say pycodestyle) only the lines that are actively changed.
This will allow project that are not pep-8 complaint to __progressivley__ become compliant if they wish. And does not prevent you from running on your changes.
## TODO.
Support applying on a commit range instead of non-comited
Support non-git.
## Limitations
Number of whitelines between function/classes might be wrong. Probably other things.
Metadata
Release files for friendlyautopep8 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| friendlyautopep8-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for friendlyautopep8-0.0.4-py3-none-any.whl |
Release files / friendlyautopep8-0.0.4-py3-none-any.whl
| Download URL | friendlyautopep8-0.0.4-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73c16b75ec3ce601b86202959fa96b6c70cc500d58cffef9422467c7d34cfdce
|
|
BLAKE2b-256 checksum How to use checksums |
2230309bf4ef6536062cdfed7d2c30e10881536692f4de9d114cb06833192b4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for friendlyautopep8 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.