summaryrefslogtreecommitdiff
path: root/pylint/reporters/base_reporter.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/reporters/base_reporter.py')
-rw-r--r--pylint/reporters/base_reporter.py23
1 files changed, 2 insertions, 21 deletions
diff --git a/pylint/reporters/base_reporter.py b/pylint/reporters/base_reporter.py
index 3df970d80..d370b1910 100644
--- a/pylint/reporters/base_reporter.py
+++ b/pylint/reporters/base_reporter.py
@@ -1,14 +1,12 @@
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
-# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
+# For details: https://github.com/pylint-dev/pylint/blob/main/LICENSE
+# Copyright (c) https://github.com/pylint-dev/pylint/blob/main/CONTRIBUTORS.txt
from __future__ import annotations
import os
import sys
-import warnings
from typing import TYPE_CHECKING, TextIO
-from warnings import warn
from pylint.message import Message
from pylint.reporters.ureports.nodes import Text
@@ -31,13 +29,6 @@ class BaseReporter:
"""Name of the reporter."""
def __init__(self, output: TextIO | None = None) -> None:
- if getattr(self, "__implements__", None):
- warnings.warn(
- "Using the __implements__ inheritance pattern for BaseReporter is no "
- "longer supported. Child classes should only inherit BaseReporter",
- DeprecationWarning,
- stacklevel=2,
- )
self.linter: PyLinter
self.section = 0
self.out: TextIO = output or sys.stdout
@@ -49,16 +40,6 @@ class BaseReporter:
"""Handle a new message triggered on the current file."""
self.messages.append(msg)
- def set_output(self, output: TextIO | None = None) -> None:
- """Set output stream."""
- # TODO: 3.0: Remove deprecated method
- warn(
- "'set_output' will be removed in 3.0, please use 'reporter.out = stream' instead",
- DeprecationWarning,
- stacklevel=2,
- )
- self.out = output or sys.stdout
-
def writeln(self, string: str = "") -> None:
"""Write a line in the output buffer."""
print(string, file=self.out)