Pycharm itself is PEP8 style detection, when you knock the code does not conform to the specification, there will be a wavy line hint. How to change the code to conform to the specification and get rid of these unsightly wavy lines. Here are steps: 2.1 installing AUTOPEP8
CMD window input: Pip install AUTOPEP8 2.2 Install AUTOPEP8 configuration in Pycharm
Tools→extends tools→ Click Plus
Configuration Items
NAME:AUTOPEP8 (free to take)
Tools settings:
PROGRAMS:AUTOPEP8 (if you've already installed it)
Parameters:--in-place--aggressive--aggressive $FilePath $
Working Directory: $ProjectFileDir $
Click Output files→ Add, in the dialog box: Regular expression to match output input: $FILE _path$\: $LINE $\: $COLUMN $\:.*
The use of AUTOPEP8 in Pycharm: Edit a new Python file in Pycharm, edit some code that does not conform to PEP8 style, and put the mouse in the editor of the file → right button →external tools→ click Autopep8. So your code fits the PEP8 style. As shown in the following figure