summaryrefslogtreecommitdiff
path: root/pylint/checkers/strings.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2019-11-08 21:37:17 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2019-11-08 21:38:58 +0100
commit09cd08c9d4e235fbdc7aa16f9cdbc020981ada06 (patch)
tree9dc1a45711f19395a6d5da9722c4f3b8217b20a1 /pylint/checkers/strings.py
parent248da9f688497d8999c57a7437d213e1cb06b2b8 (diff)
downloadpylint-git-09cd08c9d4e235fbdc7aa16f9cdbc020981ada06.tar.gz
Rename implicit-string-concat-in-sequence to implicit-string-concat
Diffstat (limited to 'pylint/checkers/strings.py')
-rw-r--r--pylint/checkers/strings.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/pylint/checkers/strings.py b/pylint/checkers/strings.py
index 95373d8aa..abdf2e8ef 100644
--- a/pylint/checkers/strings.py
+++ b/pylint/checkers/strings.py
@@ -589,12 +589,13 @@ class StringConstantChecker(BaseTokenChecker):
"Used when an escape like \\u is encountered in a byte "
"string where it has no effect.",
),
- "W1403": (
+ "W1404": (
"Implicit string concatenation found in %s",
- "implicit-str-concat-in-sequence",
+ "implicit-str-concat",
"String literals are implicitly concatenated in a "
"literal iterable definition : "
"maybe a comma is missing ?",
+ {"old_names": [("W1403", "implicit-str-concat-in-sequence")]},
),
}
options = (
@@ -605,7 +606,7 @@ class StringConstantChecker(BaseTokenChecker):
"type": "yn",
"metavar": "<y_or_n>",
"help": "This flag controls whether the "
- "implicit-str-concat-in-sequence should generate a warning "
+ "implicit-str-concat should generate a warning "
"on implicit string concatenation in sequences defined over "
"several lines.",
},
@@ -652,15 +653,15 @@ class StringConstantChecker(BaseTokenChecker):
start = (start[0], len(line[: start[1]].encode(encoding)))
self.string_tokens[start] = (str_eval(token), next_token)
- @check_messages("implicit-str-concat-in-sequence")
+ @check_messages("implicit-str-concat")
def visit_list(self, node):
self.check_for_concatenated_strings(node.elts, "list")
- @check_messages("implicit-str-concat-in-sequence")
+ @check_messages("implicit-str-concat")
def visit_set(self, node):
self.check_for_concatenated_strings(node.elts, "set")
- @check_messages("implicit-str-concat-in-sequence")
+ @check_messages("implicit-str-concat")
def visit_tuple(self, node):
self.check_for_concatenated_strings(node.elts, "tuple")
@@ -690,9 +691,7 @@ class StringConstantChecker(BaseTokenChecker):
or self.config.check_str_concat_over_line_jumps
):
self.add_message(
- "implicit-str-concat-in-sequence",
- line=elt.lineno,
- args=(iterable_type,),
+ "implicit-str-concat", line=elt.lineno, args=(iterable_type,)
)
def process_string_token(self, token, start_row):