Coverage for .tox/py312/lib/python3.12/site-packages/pylint_sort_functions/__init__.py: 100%
4 statements
« prev ^ index » next coverage.py v7.10.2, created at 2025-08-07 04:45 +0200
« prev ^ index » next coverage.py v7.10.2, created at 2025-08-07 04:45 +0200
1"""PyLint plugin to enforce alphabetical sorting of functions and methods."""
3from typing import TYPE_CHECKING
5from pylint_sort_functions import checker
7if TYPE_CHECKING:
8 from pylint.lint import PyLinter
11def register(linter: "PyLinter") -> None: # pylint: disable=function-should-be-private
12 """Register the plugin with PyLint.
14 This function is called by PyLint when the plugin is loaded.
15 It registers the FunctionSortChecker with the linter.
17 Note: This function must remain public as it's a required PyLint plugin entry point.
19 :param linter: The PyLint linter instance
20 :type linter: PyLinter
21 """
22 linter.register_checker(checker.FunctionSortChecker(linter))