Skip to content

Commit

Permalink
[Fix UP031] Fix existing issues detected by ruff 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Dec 1, 2024
1 parent a985622 commit 55098c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 5 additions & 3 deletions pylint/testutils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
import sys
from pathlib import Path

SYS_VERS_STR = (
"%d%d%d" % sys.version_info[:3] # pylint: disable=consider-using-f-string
)
# This is faster/terser without f-strings:
# '"%d%d%d" % sys.version_info[:3]': (best of 5: 214 nanoseconds per loop)
# '"".join(str(x) for x in sys.version_info[:3])'`: best of 5: 546 nanoseconds per loop
# pylint: disable-next=consider-using-f-string
SYS_VERS_STR = "%d%d%d" % sys.version_info[:3] # noqa: UP031
TITLE_UNDERLINES = ["", "=", "-", "."]
UPDATE_OPTION = "--update-functional-output"
UPDATE_FILE = Path("pylint-functional-test-update")
Expand Down
4 changes: 1 addition & 3 deletions tests/test_check_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,7 @@ def test_compare_workers_to_single_proc(
# with the number of files.
expected_stats = LinterStats(
by_module={
# pylint: disable-next=consider-using-f-string
"--test-file_data-name-%d--"
% idx: ModuleStats(
f"--test-file_data-name-{idx}--": ModuleStats(
convention=0,
error=0,
fatal=0,
Expand Down

0 comments on commit 55098c7

Please sign in to comment.