PyCharm 2016.2 Help

Auto Import

File | Settings | Editor | General | Auto Import for Windows and Linux
PyCharm | Preferences | Editor | General | Auto Import for OS X
Ctrl+Alt+S
settings


XML

Show import pop-upAutomatically display an import pop-up dialog box when typing the name of an unbound namespace.

TypeScript

Show import pop-upAutomatically display import pop-up dialog box when typing the name of a symbol that lacks import statement.
Merge imports for symbols from the same module
Use paths relative to tsconfig.jsonWhen this check box is selected, PyCharm calculates import paths using the tsconfig.json file as the root. When this check box is cleared, PyCharm calculates import paths relative to the project root.

For example, if your project is structured as follows:

ws_ts_import_example.png

With the check box selected, PyCharm generates the following import statement:

import {ClassName} from 'directory_2/file_2'

If the check box is cleared, the following import statement is generated:

import {ClassName} from '../directory_2/file_2'

Python

Show import pop-upAutomatically display an import pop-up dialog box when typing the name of a class that lacks an import statement.
Preferred import styleSelect the style of import statement to be generated. The possible options are:
  • from <module> import <name>
  • import <module>.<name>

See Also

Last modified: 23 November 2016