I'm trying to import existing project into PyCharm. I can refactor the code so that PyCharm will be pleased, but we like to have spaces around colons in dictionaries, like this: {"A" : "B"}
. We also like aligning assignments:
a = 1 abc = 3
Is there a way to configure PyCharm, so that he'll ignore all errors/warnings related to this specific stuff?
In the Settings/Preferences dialog ( Ctrl+Alt+S ), select Editor | Inspections. Locate the inspection you want to disable, and clear the checkbox next to it. Apply the changes and close the dialog.
Go to File > Settings (or Ctrl + Alt + S ) > [IDE Settings] > Editor > Code Completion. The "Autopopup code completion" setting will determine if the popup opens automatically. Below it, the "Insert selected variant by typing dot, space, etc." is likely the setting you want to turn off.
Press Ctrl+Alt+S to open the IDE settings and select Editor | Inspections. Select the profile in which you want to create a new severity level. Click any inspection and select Edit severities from the list of severity levels.
Using PyCharm 5 (community edition), you can do the following. Code -> Inspect Code. Then select the required inspection error, and click on the "Suppress" option on right hand side. Please see screenshot below:
These settings are stored in the codestyles folder under the PyCharm configuration directory and are not shared through VCS. If you want to use the project code style scheme as your default scheme, you can copy it to the IDE level.
The reported problems are grouped by type, so you can evaluate and suppress all inspections of the same type. By default, PyCharm highlights all detected code problems. Hover the mouse over the widget in top-right corner of the editor and select another level from the Highlight list: None: turn highlighting off.
In such cases, this feature in PyCharm is very helpful. Note that Suppress modifies the source code (so that no other developers on your project see the warning) while Ignore turns them off just for your machine (local Inspections Profile); other developers with different profiles will still see the warning.
Using PyCharm 5 (community edition), you can do the following: Code –> Inspect Code
. Then select the required inspection error, and click on the "Suppress" option or "Ignore errors like this" option on right hand side. Please look at the screenshot below:
When you choose the "Suppress" option, it adds a comment as shown in the screenshot below:
Suppressing can be done at the statement, or function/method, levels. If trying to suppress an argument to a function, the suppression only works at the function level (meaning it also suppresses other name reference violations that might exist within that function).
You also have the option of switching off "PEP8 coding style violations" altogether (by ticking the box shown below), or explicitly managing "Ignore Errors" manually. Screenshot given below:
In general, you should perhaps question why you are suppressing PEP8 guidelines. However, sometimes it appears necessary, for instance when using the pytest
module, it is necessary to shadow variables, etc, which the PEP8 Inspection complains about in. In such cases, this feature in PyCharm is very helpful.
If you're ok to ignore all matching issues, you can just press Alt-Enter (or click on the lightbulb) and choose "Disable Inspection". Saves you going into the settings and trying to figure out the inspection rule that matches.
From http://iambigblind.blogspot.jp/2013/02/configuring-pep8py-support-in-pycharm-27.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With