In PyCharm IDE, what is the difference between Reformat Code and Auto-Indent Lines?

StackOverflow https://stackoverflow.com/questions/23256460

  •  08-07-2023
  •  | 
  •  

سؤال

There are two options in the Code menu of PyCharm: Reformat Code and Auto-Indent Lines. They seem to be doing the same thing: reformatting the code. Is there any difference?

Reformat Code can process multiple files in the same directory. Is this the difference? One file vs. batch processing?

هل كانت مفيدة؟

المحلول

Auto-Indent Lines does just that and nothing more.

Reformat Code does much more -- it can add missing/remove unnecessary spaces/braces, split statement into multiple lines etc -- all accordingly to your Code Style.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top