Tool to convert Python code to be PEP8 compliant

后端 未结 6 1314
隐瞒了意图╮
隐瞒了意图╮ 2020-12-02 03:57

I know there are tools which validate whether your Python code is compliant with PEP8, for example there is both an online service and a python module.

However, I c

6条回答
  •  执笔经年
    2020-12-02 04:41

    If you're using eclipse + PyDev you can simply activate autopep8 from PyDev's settings: Windows -> Preferences -> type 'autopep8' in the search filter.

    Check the 'use autopep8.py for code formatting?' -> OK

    Now eclipse's CTRL-SHIFT-F code formatting should format your code using autopep8 :)

    screen shot

提交回复
热议问题