Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flying-sheep/reindent.py
The unbiased, generator-powered rewrite
https://github.com/flying-sheep/reindent.py
Last synced: about 1 month ago
JSON representation
The unbiased, generator-powered rewrite
- Host: GitHub
- URL: https://github.com/flying-sheep/reindent.py
- Owner: flying-sheep
- Created: 2012-12-11T17:43:24.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-09-02T07:06:25.000Z (over 9 years ago)
- Last Synced: 2023-03-12T00:42:31.016Z (almost 2 years ago)
- Language: Python
- Homepage:
- Size: 112 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
reindent.py
===========The unbiased, generator-powered rewrite.
Q: Why is it better than the one coming with Python right now?
--------------------------------------------------------------A: because the `-i` option of the command line interface allows you to indent with tabs or 2 spaces or whatever you prefer.
Q: What else? And how?
----------------------A:
```
usage: reindent.py [-hvdnb] [-i spaces] [file [file ...]]Reindents each input file. If none is given, code is read from stdin and
written to stdout. In this mode, all options except -i are ignored.positional arguments:
file files (and directories) to reindentoptional arguments:
-h, --help show this help message and exit
-i spaces, --indentation spaces
indentation level depth. “0” means 1 tab
(default: 4 spaces)
-v, --verbose print information during run. can be used 2 times
(default: no output)
-d, --dry-run discard reindented file contents
(default: overwrite files)
-n, --no-recurse only reindent directly passed files
(default: also indent all scripts in passed directories)
-b, --no-backup prevent backup from being created
(default: create backup)
```