DiscardEmptySections¶
Remove empty sections.
Disabling the formatter
DiscardEmptySections is included in the default formatters, but it can be also run separately with:
You can also disable it:
Remove sections only with comments¶
Sections are considered empty if there are only empty lines inside.
You can remove sections with only comments by setting allow_only_comments parameter to False. *** Comments ***
section with only comments is always considered as non-empty:
will format only the following section:
Skip formatting¶
It is possible to use the following arguments to skip formatting of the code:
It is also possible to use disablers but skip option makes it easier to skip all instances of a given
type of the code.