summaryrefslogtreecommitdiff
path: root/pylint/message
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2023-03-21 21:54:25 +0100
committerGitHub <noreply@github.com>2023-03-21 20:54:25 +0000
commitb59009a4322d8faa8c86c97853cc1d8224241b86 (patch)
tree515b17d99985b70b6f4adec76642499af9c98d51 /pylint/message
parent81520adbb25a91c145af81aa9693ce9aa3d50c28 (diff)
downloadpylint-git-b59009a4322d8faa8c86c97853cc1d8224241b86.tar.gz
[deprecation] Message.location must be a 'MessageLocationTuple' (#8477)
Diffstat (limited to 'pylint/message')
-rw-r--r--pylint/message/message.py20
1 files changed, 1 insertions, 19 deletions
diff --git a/pylint/message/message.py b/pylint/message/message.py
index 23dd6c082..0fd02c369 100644
--- a/pylint/message/message.py
+++ b/pylint/message/message.py
@@ -5,7 +5,6 @@
from __future__ import annotations
from dataclasses import asdict, dataclass
-from warnings import warn
from pylint.constants import MSG_TYPES
from pylint.interfaces import UNDEFINED, Confidence
@@ -35,27 +34,10 @@ class Message: # pylint: disable=too-many-instance-attributes
self,
msg_id: str,
symbol: str,
- location: tuple[str, str, str, str, int, int] | MessageLocationTuple,
+ location: MessageLocationTuple,
msg: str,
confidence: Confidence | None,
) -> None:
- if not isinstance(location, MessageLocationTuple):
- warn(
- "In pylint 3.0, Messages will only accept a MessageLocationTuple as location parameter",
- DeprecationWarning,
- stacklevel=2,
- )
- location = MessageLocationTuple(
- location[0],
- location[1],
- location[2],
- location[3],
- location[4],
- location[5],
- None,
- None,
- )
-
self.msg_id = msg_id
self.symbol = symbol
self.msg = msg