PyCharm indentation spaces

File -> Settings -> Editor -> Code Style -> Python (or "General" for all text files) -> Tabs and Indents (tab).

And there is a search tool in the top left corner of the settings window. You can use it to search any IDE setting.


You can set "tab size" to 2 and "indent" to 2. in the File -> Settings -> Code Style -> Python -> Tabs and Indents (tab)

check "Use tab character" in the File -> Settings -> Code Style -> Python -> Tabs and Indents (tab).Now the error or warning message like PEP8: indentation contains tabs will be removed. If the issue exist close the open files and reopen, or simply restart pycharm.

Tags:

Pycharm