PyCharm 3.4.0 Web Help

By default all enabled code inspections apply in all project files. If necessary, you can configure each code inspection (enable/disable, change its severity level and options) individually for different scopes. Such configurations, like any other inspection settings, are saved and applied as part of a specific profile.

There may be complicated cases when an inspection has different configurations associated with different scopes. When such inspection is executed in a file belonging to some or all of these scopes, then the settings of the highest priority scope-specific configuration are applied. The priorities is defined by the relative position of the inspection's scope-specific configuration in the inspection settings: the uppermost configuration has the highest priority. The configuration Everywhere else always has the lowest priority.

To define scope-specific configurations for an inspection
  1. In the inspection settings, select the desired profile. The inspections associated with the profile are displayed in the tree view.
  2. Select the desired inspection or inspection group and click Add Scope add on the toolbar.
  3. In the Choose Scope dialog box that opens, select a scope to configure an inspection for.
    The new scope-specific configuration In scope '<scope name>' as well as the configuration for the rest of the files Everywhere else will ba added to the inspection.

    Tip

    For more information on creating new and configuring existing scopes, see Configuring Scopes and File Colors.

  4. Select the scope-specific configuration and customize it as necessary: enable or disable it, change its severity and the other options, which can be different for various inspections.
  5. Customize the Everywhere else configuration to define the inspecion behavior out of the scope.
  6. If necessary, add more scope-specific configurations for the inspection.
  7. If there are several scope-specific configurations, define their relative priorities: select a configuration and click Move Scope Up arrowUp / Move Scope Down arrowDown
  8. Apply changes.

See Also

Concepts:

Procedures:

Reference:

Web Resources: