frettipy
No fretting about pretty Python.
- Prefer single over double quotation mark
- Do not omit zero before or after decimal point
- Spaces around binary operator
- No space after unary operator
- Spaces around comparison operator
- No spaces around argument-assignment operator
- No space on inner side of bracket
- No explicit line joining in brackets
- Slices: no spaces around slice operator
- Dictionaries: space after colon (but not before)
- Same indentation of lines with opening and closing bracket
- Spaces around assignment operator
- Block initiation: no space before colon
- Space after comma (but not before)
- No double spaces
- Single space between non-whitespace character and comment
- No space before opening bracket (except after keyword)
- Indentation with four spaces instead of tabs
- No trailing whitespace
- No double blank lines (except before class or function)
- No blank line at end of file
- No blank line at beginning of file
- Newline character at end of last line
Synopsis
This script formats Python source code following the above style conventions.
frettipy [-f] FILE
If -f is present, FILE is modified in place! Keep a copy or use version
control. Otherwise the intended modifications are shown without changing FILE.
If FILE is a directory, all .py and .Rmd files in the tree are processed!
Installation
Either from PyPI:
python3 -m pip install frettipy
Or from GitHub:
python3 -m pip install git+https://github.com/janberges/frettipy
Release files for frettipy 0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| frettipy-0.8.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| frettipy-0.8-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / frettipy-0.8.tar.gz
| Download URL | frettipy-0.8.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64aae5533792101c4afabb066e3befe39300468fbea9f1ead04fe49a11c20ab6
|
|
BLAKE2b-256 checksum How to use checksums |
08f5bf996ffb05b2d0c20849f8119f59b5d04669cb2957757ccf317903c6595b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / frettipy-0.8-py2.py3-none-any.whl
| Download URL | frettipy-0.8-py2.py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a1336eca523b35e6d008acda81d7be7b4d3b91ebe0a5c9690ce8f66cda1b3efe
|
|
BLAKE2b-256 checksum How to use checksums |
7a625da6c1c9bbf55018e67a114de95ce5b992e9b1998372dddecc5ec16535ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|