Skip to content

Respect comment_prefix in section headings and footers - #2705

Closed
yuefdev wants to merge 1 commit into
PyCQA:mainfrom
yuefdev:issue/1922
Closed

yuefdev wants to merge 1 commit into
PyCQA:mainfrom
yuefdev:issue/1922

Conversation

@yuefdev

@yuefdev yuefdev commented Oct 3, 2026

Copy link
Copy Markdown

Fixes #1922.

Section headings and footers always used # , ignoring comment_prefix. Use the configured prefix when emitting and recognising them, so region comments also remain stable on a second run.

Tests on Windows, Python 3.14.7:

  • python -m pytest tests/unit/test_isort.py tests/unit/test_settings.py -q: 271 passed, 4 skipped.
  • Ruff lint/format and mypy checks passed.

Both new cases fail on the original code.

@DanielNoord DanielNoord closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

section headers and footers do not abide by comment_prefix setting

2 participants