Skip to content

Commit 5429be1

Browse files
[refactor] Remove orphaned lowercase-l-suffix check (dead since 2018) (#10876)
The W0332 "lowercase-l-suffix" message was a Python 2-only check (maxversion: 3.0) that flagged `123l` vs `123L` for long integers. Its message definition was removed in May 2018 (commit 41d47dd, "Remove a couple of Python 2 specific checks", closes #1896), but the check code (`if string.endswith("l")`) survived as dead code — the unregistered message would fail if it ever triggered, which it can't since Python 3's tokenizer never produces tokens ending in `l`.
1 parent 0cdc6e8 commit 5429be1

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

pylint/checkers/format.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,6 @@ def process_tokens(self, tokens: list[tokenize.TokenInfo]) -> None:
451451
check_equal = False
452452
self.check_indent_level(line, indents[-1], line_num)
453453

454-
if tok_type == tokenize.NUMBER and string.endswith("l"):
455-
self.add_message("lowercase-l-suffix", line=line_num)
456-
457454
if string in _KEYWORD_TOKENS:
458455
self._check_keyword_parentheses(tokens, idx)
459456

0 commit comments

Comments
 (0)