sections
CommentConfig- Section
SectionChanges- SectionPart
changed_sectionscompare_sectionsextract_sectionsextract_sections_from_pathget_comment_confighas_sectionshas_sections_in_pathparse_sectionsparse_sections_from_path- replace_sections
slugwrap_in_default_sectionwrap_section
Symbol Details
class: CommentConfig
- source
Since: 0.101.0
| Field | Type | Default | Since |
|---|---|---|---|
| prefix | str |
- | 0.101.0 |
| suffix | str |
'' |
0.101.0 |
function: compare_sections
- source
Since: 0.101.0
def compare_sections(baseline_content: str, current_content: str, tool_name: str, config: CommentConfig, skip: set[str] | None = None, filename: str = '') -> list[str]:
...
Return section IDs with changes (modified or removed), excluding skipped sections.
function: extract_sections
- source
Since: 0.101.0
def extract_sections(content: str, tool_name: str, config: CommentConfig, filename: str = '') -> dict[str, str]:
...
function: extract_sections_from_path
- source
Since: 0.101.0
function: has_sections
- source
Since: 0.101.0
function: has_sections_in_path
- source
Since: 0.101.0
function: parse_sections_from_path
- source
Since: 0.101.0
function: slug
- source
Since: 0.101.0
Convert text to lowercase slug suitable for section marker IDs.
function: wrap_in_default_section
- source
Since: 0.101.0
function: wrap_section
- source
Since: 0.101.0
class: SectionChanges
- source
Since: 0.102.0
| Field | Type | Default | Since |
|---|---|---|---|
| modified | list[str] |
- | 0.102.0 |
| missing | list[str] |
- | 0.102.0 |
function: changed_sections
- source
Since: 0.102.0
def changed_sections(baseline_content: str, current_content: str, tool_name: str, config: CommentConfig, skip: set[str] | None = None, filename: str = '') -> SectionChanges:
...
Return modified and missing sections separately.
function: get_comment_config
- source
Since: 0.101.0
def get_comment_config(path: Path | str, override: CommentConfig | None = None) -> CommentConfig:
...
function: parse_sections
- source
Since: 0.101.0