__init__.py 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  2. # For details: https://github.com/pylint-dev/pylint/blob/main/LICENSE
  3. # Copyright (c) https://github.com/pylint-dev/pylint/blob/main/CONTRIBUTORS.txt
  4. """Utilities methods and classes for reporters."""
  5. from __future__ import annotations
  6. from typing import TYPE_CHECKING
  7. from pylint import utils
  8. from pylint.reporters.base_reporter import BaseReporter
  9. from pylint.reporters.collecting_reporter import CollectingReporter
  10. from pylint.reporters.json_reporter import JSONReporter
  11. from pylint.reporters.multi_reporter import MultiReporter
  12. from pylint.reporters.reports_handler_mix_in import ReportsHandlerMixIn
  13. if TYPE_CHECKING:
  14. from pylint.lint.pylinter import PyLinter
  15. def initialize(linter: PyLinter) -> None:
  16. """Initialize linter with reporters in this package."""
  17. utils.register_plugins(linter, __path__[0])
  18. __all__ = [
  19. "BaseReporter",
  20. "ReportsHandlerMixIn",
  21. "JSONReporter",
  22. "CollectingReporter",
  23. "MultiReporter",
  24. ]