As far as I can see, the wavy lines in pycharm have 3 colors: yellow, green and red
Yellow wavy line:
It is to remind users that the code is not standardized.
Solution: Use the Reformat Code function under the Code menu .
Of course, the formatting shortcut is more convenient: Ctrl+Alt+L
The following are some code standards in pycharm :
there must be two blank lines before and after the function definition, and there must be a space on both sides of the operators such as =, +, *, /, and # when used as a comment, leave it behind If a space is not at the beginning of the line, leave two spaces in front of it, and so on.
For details, please see:
https://www.cnblogs.com/liangmingshen/p/9273413.html
https://www.cnblogs.com/kendrick/p/5132274.html
Green wavy line
For details, please see:
https://blog.csdn.net/u011377894/article/details/106258955
Red wavy line
Indicates a grammatical error, and you need to carefully check what the problem is.
Yellow warning
#The following method is not reliable:
you can add two lines of code to the header of the table to import and execute the package that ignores warnings, and all warnings will be hidden when running~~
###########Ignore warnings
import warnings
warnings.filterwarnings("ignore")
I checked for a long time and finally used the right method.
Pycharm ignores the warning and restores the warning settings:
File | Settings | Inspections-Python-Unresolved references). After
removing the selected tick, the warning is eliminated~~~~:
For details of various warnings, please see:
https://pep8.readthedocs.io/en/latest/intro.html#configuration