summaryrefslogtreecommitdiff
path: root/pylint/message
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/message')
-rw-r--r--pylint/message/__init__.py4
-rw-r--r--pylint/message/_deleted_message_ids.py16
-rw-r--r--pylint/message/message.py24
-rw-r--r--pylint/message/message_definition.py22
-rw-r--r--pylint/message/message_definition_store.py6
-rw-r--r--pylint/message/message_id_store.py4
6 files changed, 22 insertions, 54 deletions
diff --git a/pylint/message/__init__.py b/pylint/message/__init__.py
index 11d2b17dc..6fa8e44b7 100644
--- a/pylint/message/__init__.py
+++ b/pylint/message/__init__.py
@@ -1,6 +1,6 @@
# 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
"""All the classes related to Message handling."""
diff --git a/pylint/message/_deleted_message_ids.py b/pylint/message/_deleted_message_ids.py
index 4f361c96a..60289e805 100644
--- a/pylint/message/_deleted_message_ids.py
+++ b/pylint/message/_deleted_message_ids.py
@@ -1,6 +1,6 @@
# 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
@@ -18,7 +18,7 @@ DELETED_MSGID_PREFIXES: list[int] = []
DELETED_MESSAGES_IDS = {
# Everything until the next comment is from the PY3K+ checker
- "https://github.com/PyCQA/pylint/pull/4942": [
+ "https://github.com/pylint-dev/pylint/pull/4942": [
DeletedMessage("W1601", "apply-builtin"),
DeletedMessage("E1601", "print-statement"),
DeletedMessage("E1602", "parameter-unpacking"),
@@ -95,10 +95,10 @@ DELETED_MESSAGES_IDS = {
DeletedMessage("W1661", "exception-escape"),
DeletedMessage("W1662", "comprehension-escape"),
],
- "https://github.com/PyCQA/pylint/pull/3578": [
+ "https://github.com/pylint-dev/pylint/pull/3578": [
DeletedMessage("W0312", "mixed-indentation"),
],
- "https://github.com/PyCQA/pylint/pull/3577": [
+ "https://github.com/pylint-dev/pylint/pull/3577": [
DeletedMessage(
"C0326",
"bad-whitespace",
@@ -109,7 +109,7 @@ DELETED_MESSAGES_IDS = {
],
),
],
- "https://github.com/PyCQA/pylint/pull/3571": [
+ "https://github.com/pylint-dev/pylint/pull/3571": [
DeletedMessage("C0330", "bad-continuation")
],
"https://pylint.readthedocs.io/en/latest/whatsnew/1/1.4.html#what-s-new-in-pylint-1-4-3": [
@@ -117,10 +117,10 @@ DELETED_MESSAGES_IDS = {
DeletedMessage("R0922", "abstract-class-little-used"),
DeletedMessage("W0142", "star-args"),
],
- "https://github.com/PyCQA/pylint/issues/2409": [
+ "https://github.com/pylint-dev/pylint/issues/2409": [
DeletedMessage("W0232", "no-init"),
],
- "https://github.com/PyCQA/pylint/pull/6421": [
+ "https://github.com/pylint-dev/pylint/pull/6421": [
DeletedMessage("W0111", "assign-to-new-keyword"),
],
}
diff --git a/pylint/message/message.py b/pylint/message/message.py
index 23dd6c082..6ee8c5f78 100644
--- a/pylint/message/message.py
+++ b/pylint/message/message.py
@@ -1,11 +1,10 @@
# 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
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
diff --git a/pylint/message/message_definition.py b/pylint/message/message_definition.py
index 25aa87d92..29a8780cb 100644
--- a/pylint/message/message_definition.py
+++ b/pylint/message/message_definition.py
@@ -1,11 +1,10 @@
# 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 sys
-import warnings
from typing import TYPE_CHECKING, Any
from astroid import nodes
@@ -73,21 +72,8 @@ class MessageDefinition:
def __str__(self) -> str:
return f"{repr(self)}:\n{self.msg} {self.description}"
- def may_be_emitted(
- self,
- py_version: tuple[int, ...] | sys._version_info | None = None,
- ) -> bool:
- """Return True if message may be emitted using the configured py_version."""
- if py_version is None:
- py_version = sys.version_info
- warnings.warn(
- "'py_version' will be a required parameter of "
- "'MessageDefinition.may_be_emitted' in pylint 3.0. The most likely "
- "solution is to use 'linter.config.py_version' if you need to keep "
- "using this function, or to use 'MessageDefinition.is_message_enabled'"
- " instead.",
- DeprecationWarning,
- )
+ def may_be_emitted(self, py_version: tuple[int, ...] | sys._version_info) -> bool:
+ """May the message be emitted using the configured py_version?"""
if self.minversion is not None and self.minversion > py_version:
return False
if self.maxversion is not None and self.maxversion <= py_version:
diff --git a/pylint/message/message_definition_store.py b/pylint/message/message_definition_store.py
index 7bbc70a51..4921be212 100644
--- a/pylint/message/message_definition_store.py
+++ b/pylint/message/message_definition_store.py
@@ -1,6 +1,6 @@
# 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
@@ -58,7 +58,7 @@ class MessageDefinitionStore:
# Since MessageDefinitionStore is only initialized once
# and the arguments are relatively small we do not run the
# risk of creating a large memory leak.
- # See discussion in: https://github.com/PyCQA/pylint/pull/5673
+ # See discussion in: https://github.com/pylint-dev/pylint/pull/5673
@functools.lru_cache( # pylint: disable=method-cache-max-size-none # noqa: B019
maxsize=None
)
diff --git a/pylint/message/message_id_store.py b/pylint/message/message_id_store.py
index d1810bd2b..273522d3d 100644
--- a/pylint/message/message_id_store.py
+++ b/pylint/message/message_id_store.py
@@ -1,6 +1,6 @@
# 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