Library to Tidy Up Python Code using pep8 conventions
Asked Answered
F

2

6

Is there any library that takes in your python file as input and does tidy-up (modifies it based on the PEP 8 conventions). To understand what I am talking about, a JavaScript analogy is as follows:

  1. Go to this link
  2. Press the button TidyUp

Any online editor or library or script would be appreciated.

Fairminded answered 21/11, 2011 at 15:3 Comment(0)
L
2

You can take a look to PythonTidy which is officially working till python2.5 (and seems to be supported in python2.6) :

Cleans up, regularizes, and reformats the text of Python scripts.

This script reads Python code from standard input and writes a revised version to standard output.

Luxuriance answered 21/11, 2011 at 15:15 Comment(1)
this is not anyways the best solution.Fairminded
U
1

pep8.py gives you warnings for violations. Doesn't actually correct though.

Uprising answered 21/11, 2011 at 15:9 Comment(1)
Yup but this is closest thing I could find which might be useful.Uprising

© 2022 - 2024 — McMap. All rights reserved.