Rename dialog for a parameter
Use this dialog to rename a parameter.
In addition to renaming the parameter itself, PyCharm can also search for usages of its name. If found, the changes that you make to the parameter name can also be applied to these usages.
The usages are grouped into categories that correspond to options you can enable or disable.
Note that regardless of the options selected, the search scope (places where you search for the name occurrences) is always limited to the current entity (for example, a file, or a class) and the entities that the current one depends on.
Item | Description |
|---|---|
Rename <parameter> and its usages to | Specify a new name for the parameter. |
Search in comments and strings | If this option is enabled, PyCharm will look for occurrences of the parameter in comments and string literals in your source code files. |
Rename parameters in hierarchy | If this option is on, PyCharm will look for occurrences of the parameter name in the names of its inheritors. If you are renaming a class, PyCharm will search the hierarchies of the classes that extend this class. |
Search in loaded sources | If this option is enabled, PyCharm will look for occurrences of the parameter in downloaded object sources. |
Preview pane | The statement to be run to rename the table or column. If necessary, you can edit the statement right in this pane. |
Refactor | Executes the statement and applies the changes immediately. |
Preview | Previews the changes before they are applied. |
Search for text occurrences | If this option is enabled, PyCharm will search for occurrences of the parameter in non-source files, such as text, properties, HTML, or documentation files. |
Scope | Use this option to set the scope for the Rename refactoring. For example, limit it to recently changed files, open files, or a custom scope that can be shared or local. |