답변:
여기 내 Pycharm의 스크린 샷이 있습니다. 필수 설정은 다음 경로에 있습니다.File -> Settings -> Editor -> Code Style -> General: Right margin (columns)
A style guide is about consistency. Consistency with this style guide is important. Consistency within a project is more important. Consistency within one module or function is most important. But most importantly: know when to be inconsistent -- sometimes the style guide just doesn't apply.
One big exception to PEP 8 is our preference of longer line lengths. We’re well into the 21st Century, and we have high-resolution computer screens that can fit way more than 79 characters on a screen. Don’t limit lines of code to 79 characters if it means the code looks significantly uglier or is harder to read.
Mac의 PyCharm 2018.1 :
환경 설정 ( ⌘+ ,), 다음 Editor -> Code Style
:
Windows의 PyCharm 2018.3의 경우 :
파일-> 설정 ( Ctrl+ Alt+ S)을 누른 다음 Editor -> Code Style
:
PEP-8을 따르려면 Hard wrap at
80으로 설정하십시오 .