Path 1: 1 calls (1.0)

PyLinter (1)

'Pylint global options and switches\n----------------------------------\n\nPylint provides global options and switches.\n\nGeneral options\n~~~~~~~~~~...

1def _get_global_options_documentation(linter: PyLinter) -> str:
2    """Get documentation for the main checker."""
3    result = get_rst_title("Pylint global options and switches", "-")
4    result += """
5Pylint provides global options and switches.
6
7"""
8    for checker in linter.get_checkers():
9        if checker.name == MAIN_CHECKER_NAME and checker.options:
10            with warnings.catch_warnings():
11                warnings.filterwarnings("ignore", category=DeprecationWarning)
12                for section, options in checker.options_by_section():
13                    if section is None:
14                        title = "General options"
15                    else:
16                        title = f"{section.capitalize()} options"
17                    result += get_rst_title(title, "~")
18                    assert isinstance(options, list)
19                    result += f"{get_rst_section(None, options)}\n"
20    return result