Line is too long. Django PEP8

前端 未结 6 1032
余生分开走
余生分开走 2021-02-01 04:09

PEP8 info:

models.py:10:80: E501 line too long (83 > 79 characters)

Models.py:

field = TreeForeignKey(\'self\', null         


        
6条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-01 05:00

    I just found this neat program called autopep8! https://github.com/hhatto/autopep8

    pip install autopep8
    autopep8 -i models.py
    

    You can also do (recursively):

    autopep8 -ri package/
    

    Auto PEP8 only makes safe changes to the files, only changing layout, not code logic.

提交回复
热议问题