You can tell PyCharm what is your preferred Python style through the Inspections and Code Style sections under Settings. The default is to warn on PEP8 style violations but you can turn this off. It is really common to use 4 space indentation (or 1 tab char), not 2 spaces, so if you plan on working on other people's Python code you may want to get used to this now. Code menu -> Reformat Code will reformat the file according to the currently selected style.
To adjust the preferred style, go to Settings menu. To change the general code style such as number of spaces to indent each line, go to Code Style -> Python. From there you can adjust things like indentation level, spacing, wrapping, and blank lines.
Search for 'pep' to find the setting to disable PEP8 inspections (either naming convention, coding style, or both.) There are many other Python inspection settings available there.
Is there a way to shut it off just for 1 specific file only? I have files, by themselves, with notes - mix of comments and code examples, but there is RED everywhere, which makes it very hard to read. Please advise, pretty please, with a much of cheese on top - PLEEEEZ
To adjust the preferred style, go to Settings menu. To change the general code style such as number of spaces to indent each line, go to Code Style -> Python. From there you can adjust things like indentation level, spacing, wrapping, and blank lines.
Search for 'pep' to find the setting to disable PEP8 inspections (either naming convention, coding style, or both.) There are many other Python inspection settings available there.
Is there a way to shut it off just for 1 specific file only? I have files, by themselves, with notes - mix of comments and code examples, but there is RED everywhere, which makes it very hard to read. Please advise, pretty please, with a much of cheese on top - PLEEEEZ
Yes, there is a way to suppress inspections for one file only: https://www.jetbrains.com/help/pycharm/disabling-and-enabling-inspections.html#change-highlighting-level-for-file
Thank you Johnrey310 and Andrey, exactly what I wanted. Would be nice if you could bind a key to toggle these lines on and off too.