No fretting about pretty Python
Project description
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)
- 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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
frettipy-0.6.tar.gz
(4.9 kB
view details)
Built Distribution
File details
Details for the file frettipy-0.6.tar.gz
.
File metadata
- Download URL: frettipy-0.6.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15342b1360ea6ab94b53d52e94cc048ad8f1bdef286fd2d683dd6db124afe934 |
|
MD5 | d7f8e0d53841dea12e29e00294f4c3fd |
|
BLAKE2b-256 | 95ddefec2fbf2fe8075e0a6df0694b39c802957b6fabf39d64603d518ef427ae |
File details
Details for the file frettipy-0.6-py2.py3-none-any.whl
.
File metadata
- Download URL: frettipy-0.6-py2.py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ace77e8093459390b996e5033fec1b90f2a7a8a1b869908a4fdd0de4543f444c |
|
MD5 | 2dce696f9391406946f0f98c2b490db0 |
|
BLAKE2b-256 | 6de80fe142c502691d70a3b5b9bf8bb026702bb8fd454947777ede716bd54585 |