summaryrefslogtreecommitdiff
path: root/script/get_unused_message_id_category.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-04-14 22:51:14 +0200
committerGitHub <noreply@github.com>2022-04-14 22:51:14 +0200
commit2e0a4e716f136d86727f903fdeb4b107e471d524 (patch)
treed8e5ab819a3bc637bd27ac36511628da29c9180d /script/get_unused_message_id_category.py
parenta693ea7e1785def007c5a80d379cc7aaf92f38a9 (diff)
downloadpylint-git-2e0a4e716f136d86727f903fdeb4b107e471d524.tar.gz
Add some manual typing changes (#6325)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Diffstat (limited to 'script/get_unused_message_id_category.py')
-rw-r--r--script/get_unused_message_id_category.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/get_unused_message_id_category.py b/script/get_unused_message_id_category.py
index 7bf1a1343..a344ba145 100644
--- a/script/get_unused_message_id_category.py
+++ b/script/get_unused_message_id_category.py
@@ -3,7 +3,7 @@
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
-from typing import List
+from __future__ import annotations
from pylint.checkers import initialize as initialize_checkers
from pylint.constants import DELETED_MSGID_PREFIXES
@@ -11,14 +11,14 @@ from pylint.extensions import initialize as initialize_extensions
from pylint.lint.pylinter import PyLinter
-def register_all_checkers_and_plugins(linter: "PyLinter") -> None:
+def register_all_checkers_and_plugins(linter: PyLinter) -> None:
"""Registers all checkers and plugins."""
linter.cmdline_parser.set_conflict_handler("resolve")
initialize_checkers(linter)
initialize_extensions(linter)
-def get_next_code_category(message_ids: List[str]) -> int:
+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