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)
- 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file frettipy-0.7.tar.gz.
File metadata
- Download URL: frettipy-0.7.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08f4063f210d3974319aa17a5f736e2cf3af6bed49f56761dbc7d6344a3c2069
|
|
| MD5 |
3348ab50e406b329602c0215092b4dce
|
|
| BLAKE2b-256 |
756a26377cf7d83ba6b6cbca713c5ae1a9b027452acbd568e976bd420b3b6ec0
|
File details
Details for the file frettipy-0.7-py2.py3-none-any.whl.
File metadata
- Download URL: frettipy-0.7-py2.py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53ff282ca4824d63b46bfd41d88731582ffdd1963d92dfbccc8c5d9e838870b8
|
|
| MD5 |
fc1fc571e9a13907191b835a9eebefa4
|
|
| BLAKE2b-256 |
4aeb1351e402b43dcc797611f9bef18de9d67b841ebc0ec5adb2dc55e6b8ec37
|