From 94dc65c1a28a5048dbdebf68d960f7cb2e835962 Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 25 Apr 2024 19:41:03 +0000 Subject: [PATCH] refactor(python): fix ruff 0.4.2 warnings --- deltachat-rpc-client/pyproject.toml | 2 +- python/pyproject.toml | 2 +- python/tests/stress_test_db.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deltachat-rpc-client/pyproject.toml b/deltachat-rpc-client/pyproject.toml index 238fb5945..596e8703f 100644 --- a/deltachat-rpc-client/pyproject.toml +++ b/deltachat-rpc-client/pyproject.toml @@ -37,7 +37,7 @@ deltachat_rpc_client = [ line-length = 120 [tool.ruff] -select = [ +lint.select = [ "E", "W", # pycodestyle "F", # Pyflakes "N", # pep8-naming diff --git a/python/pyproject.toml b/python/pyproject.toml index 75469b4a6..1504acddd 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -46,7 +46,7 @@ deltachat = [ line-length = 120 [tool.ruff] -select = ["E", "F", "W", "YTT", "C4", "ISC", "ICN", "TID", "DTZ", "PLC", "PLE", "PLW", "PIE", "COM", "UP004", "UP010", "UP031", "UP032", "ANN204"] +lint.select = ["E", "F", "W", "YTT", "C4", "ISC", "ICN", "TID", "DTZ", "PLC", "PLE", "PLW", "PIE", "COM", "UP004", "UP010", "UP031", "UP032", "ANN204"] line-length = 120 [tool.isort] diff --git a/python/tests/stress_test_db.py b/python/tests/stress_test_db.py index 9a793a816..d858a2274 100644 --- a/python/tests/stress_test_db.py +++ b/python/tests/stress_test_db.py @@ -18,14 +18,14 @@ def test_db_busy_error(acfactory): # make a number of accounts accounts = acfactory.get_many_online_accounts(3) - log("created %s accounts" % len(accounts)) + log(f"created {len(accounts)} accounts") # put a bigfile into each account for acc in accounts: acc.bigfile = os.path.join(acc.get_blobdir(), "bigfile") with open(acc.bigfile, "wb") as f: f.write(b"01234567890" * 1000_000) - log("created %s bigfiles" % len(accounts)) + log(f"created {len(accounts)} bigfiles") contact_addrs = [acc.get_self_contact().addr for acc in accounts] chat = accounts[0].create_group_chat("stress-group")