PyCharm
 
2021.1
Get PyCharm
You are viewing the documentation for an earlier version of PyCharm.

Auto import

Last modified: 30 June 2021

When you reference a class that has not been imported, PyCharm helps you locate this file and add it to the list of imports. You can import a single class or an entire package, depending on your settings.

The import statement is added to the imports section, but the caret does not move from the current position, and your current editing session does not suspend. This feature is known as the Import Assistant.

The same possibility applies to XML files. When you type a tag with an unbound namespace, the import assistant suggests to create a namespace and offers a list of appropriate choices.