sections
Symbol Details
class CommentConfig:
prefix: str
suffix: str = ''
| Field |
Type |
Default |
Since |
| prefix |
str |
- |
0.101.0 |
| suffix |
str |
'' |
0.101.0 |
Changes
| Version |
Change |
| 0.101.0 |
Made public |
function: compare_sections
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.
Changes
| Version |
Change |
| 0.101.0 |
Made public |
def extract_sections(content: str, tool_name: str, config: CommentConfig, filename: str = '') -> dict[str, str]:
...
Changes
| Version |
Change |
| 0.101.0 |
Made public |
def extract_sections_from_path(path: Path, tool_name: str) -> dict[str, str]:
...
Changes
| Version |
Change |
| 0.101.0 |
Made public |
function: has_sections
def has_sections(content: str, tool_name: str, config: CommentConfig) -> bool:
...
Changes
| Version |
Change |
| 0.101.0 |
Made public |
function: has_sections_in_path
def has_sections_in_path(path: Path, tool_name: str) -> bool:
...
Changes
| Version |
Change |
| 0.101.0 |
Made public |
function: parse_sections_from_path
def parse_sections_from_path(path: Path, tool_name: str) -> list[Section]:
...
Changes
| Version |
Change |
| 0.101.0 |
Made public |
function: slug
def slug(text: str) -> str:
...
Convert text to lowercase slug suitable for section marker IDs.
Changes
| Version |
Change |
| 0.101.0 |
Made public |
function: wrap_in_default_section
def wrap_in_default_section(content: str, tool_name: str, config: CommentConfig) -> str:
...
Changes
| Version |
Change |
| 0.101.0 |
Made public |
function: wrap_section
def wrap_section(content: str, section_id: str, tool_name: str, config: CommentConfig) -> str:
...
Changes
| Version |
Change |
| 0.101.0 |
Made public |
class: SectionChanges
class SectionChanges:
modified: list[str]
missing: list[str]
| Field |
Type |
Default |
Since |
| modified |
list[str] |
- |
0.102.0 |
| missing |
list[str] |
- |
0.102.0 |
Changes
| Version |
Change |
| 0.102.0 |
Made public |
function: changed_sections
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.
Changes
| Version |
Change |
| 0.102.0 |
Made public |
def get_comment_config(path: Path | str, override: CommentConfig | None = None) -> CommentConfig:
...
Changes
| Version |
Change |
| 0.101.0 |
Made public |
function: parse_sections
def parse_sections(content: str, tool_name: str, config: CommentConfig, filename: str = '') -> list[Section]:
...
Changes
| Version |
Change |
| 0.101.0 |
Made public |