From 90d963058ea1faba53e27b425662efe421b535a4 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 3 Jun 2022 10:13:58 +0200 Subject: [deleted messages] Refactor the constant to be able to give a reason --- script/get_unused_message_id_category.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script') diff --git a/script/get_unused_message_id_category.py b/script/get_unused_message_id_category.py index a344ba145..621487551 100644 --- a/script/get_unused_message_id_category.py +++ b/script/get_unused_message_id_category.py @@ -6,9 +6,9 @@ from __future__ import annotations from pylint.checkers import initialize as initialize_checkers -from pylint.constants import DELETED_MSGID_PREFIXES from pylint.extensions import initialize as initialize_extensions from pylint.lint.pylinter import PyLinter +from pylint.message.deleted_message_ids import _DELETED_MSGID_PREFIXES def register_all_checkers_and_plugins(linter: PyLinter) -> None: @@ -21,7 +21,7 @@ def register_all_checkers_and_plugins(linter: PyLinter) -> None: def get_next_code_category(message_ids: list[str]) -> int: categories = sorted({int(i[:2]) for i in message_ids}) # We add the prefixes for deleted checkers - categories += DELETED_MSGID_PREFIXES + categories += _DELETED_MSGID_PREFIXES for i in categories: if i + 1 not in categories: return i + 1 -- cgit v1.2.1