diff --git a/doc/exts/pylint_options.py b/doc/exts/pylint_options.py index 39e4138cfc2..fd640dbd384 100644 --- a/doc/exts/pylint_options.py +++ b/doc/exts/pylint_options.py @@ -175,13 +175,18 @@ def _write_options_page(options: OptionsDataDict, linter: PyLinter) -> None: get_rst_title("Standard Checkers", "^"), ] found_extensions = False + # We can't sort without using a key because if keys are checkers # then it's impossible to have a checker with the same name spanning # various class, and it would make pylint plugin code less readable # by forcing to use a single class / file - for checker_name, checker_options in sorted( - options.items(), key=lambda x: x[1][0].checker - ): + sorted_checkers = sorted(options.items(), key=lambda x: x[1][0].checker) + to_print = [ + f"({k}, {v[0].checker.__class__} [{' '.join([i.name for i in v])})]" + for k, v in sorted_checkers + ] + print("\n".join(to_print)) + for checker_name, checker_options in sorted_checkers: if not found_extensions and checker_options[0].extension: sections.append(get_rst_title("Extensions", "^")) found_extensions = True