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
- 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
- No blank line at end of file
- No blank line at beginning of file
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 files in the directory 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.3.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for frettipy-0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b192dcf5e3f315adc3f160aa6ae822cd6aebe9f4804043668f7ca838f6c07fd2 |
|
MD5 | 4b9fcfa0a0347d5474f342e82ff614b1 |
|
BLAKE2b-256 | 2aa695eb7ea6ead8f8f03658310d8195944f8850487370ea6072f579fdeca18f |