isort
isort copied to clipboard
section headers and footers do not abide by comment_prefix setting
Section headers and footers do not currently abide by the comment_prefix setting, and as such, can break region folding if used for the section headers/footers as seen below.
example config:
comment_prefix = ""
import_heading_stdlib = "#region Standard Library"
import_footer_stdlib = "#endregion Standard Library"
expected output:
#region Standard Library
import sys
#endregion Standard Library
actual output:
# #region Standard Library
import sys
# #endregion Standard Library
This does not work for me either. It wont end show the comment.
setup.cfg
[tool.isort]
default_section = THIRDPARTY
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
import_heading_future = Future
import_heading_stdlib = Standard Library
import_heading_thirdparty = Third Party
expected output
# Standard Library
import os
import sys
from datetime import datetime
# Third Party
import pandas as pd
import seaborn as sns
actual output
import os
import sys
from datetime import datetime
import pandas as pd
import seaborn as sns
CLI
isort file.py
Am I missing something? Am I calling this wrong?