summaryrefslogtreecommitdiff
path: root/pylint/checkers/strings.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers/strings.py')
-rw-r--r--pylint/checkers/strings.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/pylint/checkers/strings.py b/pylint/checkers/strings.py
index 380d87fb0..2cc780da5 100644
--- a/pylint/checkers/strings.py
+++ b/pylint/checkers/strings.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
"""Checker for string formatting operations."""
@@ -8,11 +8,10 @@ from __future__ import annotations
import collections
import re
-import sys
import tokenize
from collections import Counter
from collections.abc import Iterable, Sequence
-from typing import TYPE_CHECKING
+from typing import TYPE_CHECKING, Literal
import astroid
from astroid import bases, nodes, util
@@ -26,11 +25,6 @@ from pylint.typing import MessageDefinitionTuple
if TYPE_CHECKING:
from pylint.lint import PyLinter
-if sys.version_info >= (3, 8):
- from typing import Literal
-else:
- from typing_extensions import Literal
-
_AST_NODE_STR_TYPES = ("__builtin__.unicode", "__builtin__.str", "builtins.str")
# Prefixes for both strings and bytes literals per
@@ -816,7 +810,7 @@ class StringConstantChecker(BaseTokenChecker, BaseRawFileChecker):
token_index = (elt.lineno, elt.col_offset)
if token_index not in self.string_tokens:
# This may happen with Latin1 encoding
- # cf. https://github.com/PyCQA/pylint/issues/2610
+ # cf. https://github.com/pylint-dev/pylint/issues/2610
continue
matching_token, next_token = self.string_tokens[token_index]
# We detect string concatenation: the AST Const is the