Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lensvol/commandante
Proof-of-concept tool for finding missing trailing commas in Python code.
https://github.com/lensvol/commandante
Last synced: 13 days ago
JSON representation
Proof-of-concept tool for finding missing trailing commas in Python code.
- Host: GitHub
- URL: https://github.com/lensvol/commandante
- Owner: lensvol
- License: mit
- Created: 2015-08-01T19:32:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-20T05:09:57.000Z (over 9 years ago)
- Last Synced: 2024-11-10T13:12:52.026Z (2 months ago)
- Language: Python
- Size: 172 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
commandante
===========Simple tool for finding forgotten trailing commas in Python expressions.
Why do I even...
----------------
Honestly, this tool won't be of much use to most of users. But there are always will be nitpickers with an axe to grind against superfluous lines in GitHub diffs. Hopefully, it will help you deal with them. :)One of worst offenders is missing trailing comma at the end of the collections which are spread across multiple lines. Adding new items to them involves adding comma to previous line and this shows in diff.
Installation
------------pip install commandante
Running tests
-------------pip install pytest
py.test tests
Usage
-----bash-3.2$ commandante 1.py main.py test.py
main.py:45:72: Y001 missing trailing comma
test.py:46:12: Y001 missing trailing commaOptions
-------`--autofix`
Attempt to insert missing commas upon detection.
**Example:**
bash-3.2$ cat test.py
a = (
1,
2
)
bash-3.2$ commandante --autofix test.py
bash-3.2$ cat test.py
a = (
1,
2,
)License
-------MIT, man.