Verifying PEP8 in iPython notebook code

后端 未结 4 1921
醉酒成梦
醉酒成梦 2020-12-12 22:16

Is there an easy way to check that iPython notebook code, while it\'s being written, is compliant with PEP8?

4条回答
  •  有刺的猬
    2020-12-12 22:55

    You could include parts of my script (link below) to see details which code lines need specific PEP8 corrections. You could also runs it independently.

    The script includes PEP8 comments into the py file code based on flake8. This makes it very easy to immediately jump to the place where the correction of the style is needed.

    You can check it here: https://github.com/Softerec/PEP8-commenter

提交回复
热议问题