当前位置:网站首页>Pycahrm reports an error: indentation error: unindent does not match any outer indentation

Pycahrm reports an error: indentation error: unindent does not match any outer indentation

2022-07-05 06:37:00 timingzj

pycahrm Report errors IndentationError: unindent does not match any outer indentation

The indentation error :IndentationError: unindent Does not match any external indents
            This error occurs because of spaces and Tab Key mix

Method 1 : stay File → Settings → Code Style → Python Make the following settings in  Insert picture description here

Method 2 : Use pycharm Own code formatting shortcut Ctrl+Alt+L , Note whether the shortcut key has been occupied by other software ( Such as :QQ)


pycharm Shortcut key modification :
   Enter the first File → Settings → Keymap → Main Menu → Code → Folding in
 Insert picture description here    Right click Remove Ctrl+Alt+L Insert picture description here    Again Add Keyboard Shortcut Set it as a shortcut key that you are familiar with and have not been occupied
 Insert picture description here

原网站

版权声明
本文为[timingzj]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140603055226.html