Skip to content

Commit 55098c7

Browse files
[Fix UP031] Fix existing issues detected by ruff 0.8.1
1 parent a985622 commit 55098c7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pylint/testutils/constants.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
import sys
88
from pathlib import Path
99

10-
SYS_VERS_STR = (
11-
"%d%d%d" % sys.version_info[:3] # pylint: disable=consider-using-f-string
12-
)
10+
# This is faster/terser without f-strings:
11+
# '"%d%d%d" % sys.version_info[:3]': (best of 5: 214 nanoseconds per loop)
12+
# '"".join(str(x) for x in sys.version_info[:3])'`: best of 5: 546 nanoseconds per loop
13+
# pylint: disable-next=consider-using-f-string
14+
SYS_VERS_STR = "%d%d%d" % sys.version_info[:3] # noqa: UP031
1315
TITLE_UNDERLINES = ["", "=", "-", "."]
1416
UPDATE_OPTION = "--update-functional-output"
1517
UPDATE_FILE = Path("pylint-functional-test-update")

tests/test_check_parallel.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,7 @@ def test_compare_workers_to_single_proc(
483483
# with the number of files.
484484
expected_stats = LinterStats(
485485
by_module={
486-
# pylint: disable-next=consider-using-f-string
487-
"--test-file_data-name-%d--"
488-
% idx: ModuleStats(
486+
f"--test-file_data-name-{idx}--": ModuleStats(
489487
convention=0,
490488
error=0,
491489
fatal=0,

0 commit comments

Comments
 (0)