summaryrefslogtreecommitdiff
path: root/pylint/message
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-11-22 22:40:26 +0100
committerGitHub <noreply@github.com>2021-11-22 22:40:26 +0100
commitee70d41881600b67c3d98d41c060b81a22a45210 (patch)
tree603f49c38007f4a52410059d4796c5185574844a /pylint/message
parente4fd27544c04c9637b89fb678c1df19166506a10 (diff)
downloadpylint-git-ee70d41881600b67c3d98d41c060b81a22a45210.tar.gz
Add ``end_lineno`` and ``end_col_offset`` to ``MessageLocationTuple`` (#5343)
Diffstat (limited to 'pylint/message')
-rw-r--r--pylint/message/message.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pylint/message/message.py b/pylint/message/message.py
index 178079223..b431d502b 100644
--- a/pylint/message/message.py
+++ b/pylint/message/message.py
@@ -25,6 +25,8 @@ _MsgBase = collections.namedtuple(
"obj",
"line",
"column",
+ "end_line",
+ "end_column",
],
)
@@ -59,7 +61,10 @@ class Message(_MsgBase):
cls,
msg_id: str,
symbol: str,
- location: Union[Tuple[str, str, str, str, int, int], MessageLocationTuple],
+ location: Union[
+ Tuple[str, str, str, str, int, int],
+ MessageLocationTuple,
+ ],
msg: str,
confidence: Optional[Confidence],
) -> "Message":
@@ -68,6 +73,7 @@ class Message(_MsgBase):
"In pylint 3.0, Messages will only accept a MessageLocationTuple as location parameter",
DeprecationWarning,
)
+ location = location + (None, None) # type: ignore[assignment] # Temporary fix until deprecation
return _MsgBase.__new__(
cls,
msg_id,