Skip to main content

No project description provided

Project description

Coderedo

Python code reformater

Coderedo is simple program to reformat your python code, after indention error for example 🤗️.

To use coderedo, make this
git clone https://github.com/RidoineEl/coderedo.git
cd coderedo
python3 coderedo.py -f test.py

Coderedo parameters:

  • -f or --file: the path of python file
  • -go or --get-old: set value on 1 to get the old version of the processed file. (optional)
  • -t or --tab-size: your tab size, default is 4 (optional)

Example scenario

Take this file: test.py in test directory
test/test.py

def func():
  print("Hello Wolrd !")
  print("Your are awesome")

func()

Output after running this

File "test/test.py", line 4
  print("Your are awesome")
                           ^
TabError: inconsistent use of tabs and spaces in indentation

🤧️ There was a runtime error because, there are spaces for indentation on line 2 and tabulations on line 3.

Note: In python, there only must be indentions or spaces per code sub bloc

Fix this with coderedo

fix

python3 coderedo.py -f test/test.py

Run this now

python3 test/test.py

Output

Hello Wolrd !
Your are awesome

Ouff 🙂️...

Futures

  • Make recursive on a directory 🤔️

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

coderedo-2.0.0.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

coderedo-2.0.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page