CLI that formats Python code in such a way that after the function definition header all newlines will be deleted
Project description
Eliminate Newlines CLI
This CLI formats Python code in such a way that after the function definition header all newlines will be deleted.
Example
def foo(a):
return a + 1
class A:
def bar(self,
b,
c):
return b + c
will be formatted to:
def foo(a):
return a + 1
class A:
def bar(self,
b,
c):
return a + b + c
Example usage:
Reformat file:
eliminate_newlines testfile.py
Reformat folder (recursively):
eliminate_newlines /path/to/testfolder
Check mode:
eliminate_newlines testfile.py --check
Return Codes
Return code 0 means nothing would change.
Return code 1 means some files would be reformatted.
Return code 123 means there was an internal error.
CLI Documentation:
eliminate_newlines --help
Usage: eliminate_newlines [OPTIONS] PATH
This CLI formats Python code in such a way that after the function
definition header all newlines will be deleted.
Return code 0 means nothing would change. Return code 1 means some files
would be reformatted. Return code 123 means there was an internal error.""
pass.
Passed PATH can be either a file or a directory. In the latter case, all
files in the folder will be formatted recursively.
Options:
--check Don't write the files back, just return the status.
--help Show this message and exit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eliminate-newlines-1.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for eliminate_newlines-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b88431973084f099b29bbc7f564c56d85b326a9a4c9aec349db05d4345c52989 |
|
MD5 | e71f722e71922ffe91e575dc4779359b |
|
BLAKE2b-256 | 1740267d1c9fcd81730c8d23c8196179fc0f934197d80d51a22818a104d3cf4f |