Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get PyCharm to check PEP8 code style?

Tags:

python

pycharm

I'm using PyCharm (v 2.7.2) to develop a Django app, but I can't get it to check PEP8 style violations. I have enabled "PEP8 coding style violation" in the "Inspctions" section of the settings, but PyCharm doesn't highlight the style violations. Is there a way to fix this?

like image 546
Alvaro Avatar asked Jun 17 '13 02:06

Alvaro


People also ask

Does PyCharm check for PEP8?

So, as you can see, PyCharm supports PEP8 as the official Python style guide.

How does PyCharm determine coding styles?

Press Ctrl+Alt+S to open the IDE settings and select Editor | Code Style. To configure a scheme for new projects, go to File | New Projects Setup | Settings/Preferences for New Projects | Editor | Code Style.

How do I get the Beautify code in PyCharm?

The dialog appears when you press Ctrl+Alt+Shift+L in the editor of the current file. If you choose Code | Reformat Code from the main menu or press Ctrl+Alt+L , PyCharm tries to reformat the source code of the specified scope automatically.


1 Answers

Mine wasn't showing up due to the color scheme. By default it's marked as "weak warning", so you might have to edit the appearance to make it visible. Editor > Colors & Fonts > General > Errors and Warnings.

like image 94
RubberDuckRabbit Avatar answered Sep 22 '22 12:09

RubberDuckRabbit