Disable PEP8 check "on the fly", check only when saving a file

I use PyCharm Community Edition 4.5.4, and I hate how it notifies me of every little β€œmistake” I make, even when I have the full intention to fix it within 30 seconds.

My style is to write everything at once (instead of finishing one thing before moving on to another), and so every second word in my code stands out as variable 'x' is not used or Unresolved reference 'x' because I already moved to another section of my code that wants to end the for loop later. If I do something like:

 for x in my_list: pass 

And then go to define my_list on top of the file, it will instantly highlight Local variable 'x' is not used . I want to write all my code freely, and then, after the hit, I want to know what mistakes I made.

Is there a way to disable PEP8 checking, so it will only check when I actually save the file, and not when I print anything at all?

+5
source share
1 answer

I also had problems with this problem.

Unfortunately , there seems to be no documentary way to do what you request. PyCharm's articles on Verifying Code and Configuring Verifications really don’t hint at any such possibility. Moreover, the configuration file in ~/.PyCharm40/config/inspection/Default.xml is not what you would call rich in parameters ( note : I have no idea if there are more options, cannot find suitable documentation).

Since pep8.py seems to run continuously as a background process in PyCharm, I also checked if these processes could be configured. Unfortunately (again), no useful results were found. To aggravate the situation, it seems that in its plugin repository there is no corresponding plugin that allows you to further configure the verification tool.

Another option I tried was changing the settings in PyCharm and accessing pep8 manual calls. I did not select validation for pep8 from the Settings | Editor | Inspections | Python Settings | Editor | Inspections | Python Settings | Editor | Inspections | Python , and then performed a manual check by pressing Ctrl + Alt + Shift + I and entering two pep parameters. It seems that he did not catch the same symbolic errors .

You probably have two options right now: one is switching to another IDE, as suggested by Adam Smith (or actually noted), and the second is trying to get some help in the PyCharm Forum .

+3
source

All Articles