https://stackoverflow.com/questions/53264075/pycharm-taberror-inconsistent-use-of-tabs-and-spaces-in-indentation
In the “Settings | Editor | Code Style” – try disabling “Detect and use existing file indents for editing” in case if you have it enabled (it is by default). NOTE: re-opening file in editor may be required.