Path 1: 37 calls (1.0)

StringIO (37)

'MAIN' (2) 'BASIC' (2) 'CLASSES' (2) 'DESIGN' (2) 'EXCEPTIONS' (2) 'FORMAT' (2) 'IMPORTS' (2) 'LOGGING' (2) 'MESSAGES CONTROL' (2) 'METHOD_ARGS' (2)

list (37)

None (37)

1def format_section(
2    stream: TextIO,
3    section: str,
4    options: list[tuple[str, OptionDict, Any]],
5    doc: str | None = None,
6) -> None:
7    """Format an option's section using the INI format."""
8    warnings.warn(
9        "format_section has been deprecated. It will be removed in pylint 3.0.",
10        DeprecationWarning,
11        stacklevel=2,
12    )
13    if doc:
14        print(_comment(doc), file=stream)
15    print(f"[{section}]", file=stream)
16    with warnings.catch_warnings():
17        warnings.filterwarnings("ignore", category=DeprecationWarning)
18        _ini_format(stream, options)