PyCharm Limit Spaces

How to change indentation in pycharm only by 2 spaces instead of 4? My team follows pep8, but preferred to use 2 spaces instead of four, and I cannot find them to change it.

+5
source share
3 answers

File → Settings → Editor → Code Style → Python (or “General” for all text files) → Tabs and Tabs (tab).

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

+5
source

" " 2, "" - 2. "" → "" → " " → "" → " " ()

" " "" → "" → " " → "" → " " (). PEP8: indentation contains tabs . , pycharm.

+1

/ :

  • File -> Default Settings...
  • , Editor -> Code Style -> Python/Other File Types
  • / = 2 .

-

enter image description here

+1

Source: https://habr.com/ru/post/1527319/


All Articles