Skip to content

Commit

Permalink
feature(ruff): add f-string-missing-placeholders (F541) to linter
Browse files Browse the repository at this point in the history
since we have this check on older branches using pylint
and it's easily fixable checked, we are introducing this one
to minimize issues with backporting

Ref: https://docs.astral.sh/ruff/rules/f-string-missing-placeholders/#f-string-missing-placeholders-f541
  • Loading branch information
fruch committed Dec 17, 2024
1 parent 9218a8a commit 4017a77
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mgmt_cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ def test_restore_from_precreated_backup(self, snapshot_name: str, restore_outsid
keyspace_name=snapshot_data.keyspaces[0],
num_of_rows=snapshot_data.number_of_rows)
else:
self.log.info(f"Skipping verification read stress because of the test or snapshot configuration")
self.log.info("Skipping verification read stress because of the test or snapshot configuration")

def test_restore_benchmark(self):
"""Benchmark restore operation.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ lint.select = [
"F401", "F821", "F823", "F841",
"PL", "PLR0913","PLR0914", "PLR0916",
"YTT",
"F541",
]

lint.ignore = ["E501", "PLR2004"]
Expand Down
2 changes: 1 addition & 1 deletion sdcm/argus_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def send_result_to_argus(argus_client: ArgusClient, workload: str, name: str, de
result_table = ReactorStallStatsResult()
result_table.name = f"{workload} - {name} - stalls - {event_name}"
result_table.description = f"{event_name} event counts"
result_table.add_result(column=f"total", row=f"Cycle #{cycle}",
result_table.add_result(column="total", row=f"Cycle #{cycle}",
value=stall_stats["counter"], status=Status.PASS)
for interval, value in stall_stats["ms"].items():
result_table.add_result(column=f"{interval}ms", row=f"Cycle #{cycle}",
Expand Down
2 changes: 1 addition & 1 deletion sdcm/sct_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2823,7 +2823,7 @@ def _verify_scylla_bench_mode_and_workload_parameters(self):

def _validate_docker_backend_parameters(self):
if self.get("use_mgmt"):
raise ValueError(f"Scylla Manager is not supported for docker backend")
raise ValueError("Scylla Manager is not supported for docker backend")


def init_and_verify_sct_config() -> SCTConfiguration:
Expand Down
2 changes: 1 addition & 1 deletion sdcm/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -2961,7 +2961,7 @@ def clean_resources(self):

self.destroy_credentials()

@silence(name=f"Save node schema", raise_error_event=False)
@silence(name="Save node schema", raise_error_event=False)
def save_cqlsh_output_in_file(self, node, cmd: str, log_file: str):
self.log.info("Save command '%s' output in the file. Node %s", cmd, node.name)

Expand Down
2 changes: 1 addition & 1 deletion unit_tests/rest/test_compaction_manager_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ def test_compaction_manager_stop_compaction():
client = CompactionManagerClient(FakeNode())
result = partial(client.stop_compaction, compaction_type="reshape")()

assert result.stdout == f'curl -v -X POST "http://localhost:10000/compaction_manager/stop_compaction?type=RESHAPE"'
assert result.stdout == 'curl -v -X POST "http://localhost:10000/compaction_manager/stop_compaction?type=RESHAPE"'

0 comments on commit 4017a77

Please sign in to comment.