file—>setting,选择Editor—>python,如下图所示:
源自: pycharm Tab键设置成4个空格 - 林不凡 - 博客园 https://www.cnblogs.com/Will-guo/p/6321843.html