Library for organizing Python code using pep8 conventions

Is there any library that takes your python file as input and does an order (modifies it based on PEP 8 conventions). To understand what I'm talking about, the analogue of JavaScript looks like this:

  • Go to this link
  • Click the TidyUp Button

Any online editor or library or script would be appreciated.

+6
source share
2 answers

You can take a look at PythonTidy , which officially works before python2.5 (and seems to be supported in python2.6):

Cleans, organizes, and reformatts the text of Python scripts.

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

+2
source

pep8.py gives you warnings about violations. This is not really a fix.

+1
source

Source: https://habr.com/ru/post/902013/


All Articles