PyCharm Help

Configuring Inspection for Different Scopes

In this section:

Basics

By default, all enabled code inspections apply to 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, the settings of the highest priority scope-specific configuration are applied. The priorities are defined by the relative position of the inspection's scope-specific configuration in inspection settings: the uppermost configuration has the highest priority. The Everywhere else configuration always has the lowest priority.

Defining the order of scopes

To define the order of scopes, follow these steps

  1. Choose Edit Scopes Order... from the scopes drop-down list:
    inspections_scopes
  2. In the Scopes Order dialog box that opens, select the desired scope, and click the up and down arrows arrowUparrowDown:
    scopes_order

See Also

Concepts:

Web Resources:

Procedures:

Last modified: 15 May 2015