Path 1: 18 calls (0.95)

None (18)

list (18)

None (18)

':example-args:\n Example of integer argument for the checker.\n\n Default: ``42``\n' (1) ":ignore:\n Files or directories to be skipped. They shou...

1def get_rst_section(
2    section: str | None,
3    options: list[tuple[str, OptionDict, Any]],
4    doc: str | None = None,
5) -> str:
6    """Format an option's section using as a ReStructuredText formatted output."""
7    result = ""
8    if section:
9        result += get_rst_title(section, "'")
10    if doc:
11        formatted_doc = normalize_text(doc)
12        result += f"{formatted_doc}\n\n"
13    for optname, optdict, value in options:
14        help_opt = optdict.get("help")
15        result += f":{optname}:\n"
16        if help_opt:
17            assert isinstance(help_opt, str)
18            formatted_help = normalize_text(help_opt, indent="  ")
19            result += f"{formatted_help}\n"
20        if value and optname != "py-version":
21            value = str(_format_option_value(optdict, value))
22            result += f"\n  Default: ``{value.replace('`` ', '```` ``')}``\n"
23    return result
            

Path 2: 1 calls (0.05)

None (1)

list (1)

None (1)

':check-str-concat-over-line-jumps:\n This flag controls whether the implicit-str-concat should generate a warning\n on implicit string concatenatio...

1def get_rst_section(
2    section: str | None,
3    options: list[tuple[str, OptionDict, Any]],
4    doc: str | None = None,
5) -> str:
6    """Format an option's section using as a ReStructuredText formatted output."""
7    result = ""
8    if section:
9        result += get_rst_title(section, "'")
10    if doc:
11        formatted_doc = normalize_text(doc)
12        result += f"{formatted_doc}\n\n"
13    for optname, optdict, value in options:
14        help_opt = optdict.get("help")
15        result += f":{optname}:\n"
16        if help_opt:
17            assert isinstance(help_opt, str)
18            formatted_help = normalize_text(help_opt, indent="  ")
19            result += f"{formatted_help}\n"
20        if value and optname != "py-version":
21            value = str(_format_option_value(optdict, value))
22            result += f"\n  Default: ``{value.replace('`` ', '```` ``')}``\n"
23    return result