https://github.com/likianta/lkfmt
All-in-one Python code formattor which is tailored of "black + isort + autoflake" for myself taste.
https://github.com/likianta/lkfmt
autoflake black code-formatter code-style formatter isort python-formatter reformat
Last synced: 2 months ago
JSON representation
All-in-one Python code formattor which is tailored of "black + isort + autoflake" for myself taste.
- Host: GitHub
- URL: https://github.com/likianta/lkfmt
- Owner: likianta
- License: mit
- Created: 2023-07-19T03:39:50.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-31T08:35:07.000Z (6 months ago)
- Last Synced: 2025-04-12T00:48:01.792Z (3 months ago)
- Topics: autoflake, black, code-formatter, code-style, formatter, isort, python-formatter, reformat
- Language: Python
- Homepage:
- Size: 393 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Likianta Flavored Formatter
`lkfmt` (Likianta flavored formatter) is an integration of `black` + `isort` +
`autoflake` with pre-defined settings to reformat my Python script code.## Features
- `black` + `isort` + `autoflake` integration
- out-of-box settings
- one command to drive
- additional format styles by lk-flavor (*work in progress*)
- keep indents on empty lines
- ensure newline at end of file
- merge one-line `if`/`for` statements
- align `:` in dict key-value pairs
- align `=` in multi-line assignments
- **tweak `black` styles to balance the visual weight**
- use `# nofmt` to skip formatting (like `# noqa`)## Installation
pip install lkfmt
(not yet published)```sh
pip install git+https://github.com/likianta/lkfmt.git
```## Usage
use in command line:
```sh
# after installation, there's an executable named `lkfmt`.# get help
lkfmt -h# format files in current dir
lkfmt .
# it can also be shorthand as `lkfmt` (no argument)# format files in current dir and subdirs recursively
lkfmt -r .# format one file
lkfmt $file# show difference (but not inplace file)
python -m lkfmt show-diff $file
```## Screenshots


