Library to Tidy Up Python Code using pep8 conventions
-
05-03-2021 - |
Question
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:
- Go to this link
- Press the button TidyUp
Any online editor or library or script would be appreciated.
Solution
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.
OTHER TIPS
pep8.py gives you warnings for violations. Doesn't actually correct though.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow