mirror of
https://github.com/chatmail/core.git
synced 2026-05-01 20:36:31 +03:00
refactor(python): fix ruff 0.4.2 warnings
This commit is contained in:
@@ -37,7 +37,7 @@ deltachat_rpc_client = [
|
|||||||
line-length = 120
|
line-length = 120
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
select = [
|
lint.select = [
|
||||||
"E", "W", # pycodestyle
|
"E", "W", # pycodestyle
|
||||||
"F", # Pyflakes
|
"F", # Pyflakes
|
||||||
"N", # pep8-naming
|
"N", # pep8-naming
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ deltachat = [
|
|||||||
line-length = 120
|
line-length = 120
|
||||||
|
|
||||||
[tool.ruff]
|
[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
|
line-length = 120
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ def test_db_busy_error(acfactory):
|
|||||||
|
|
||||||
# make a number of accounts
|
# make a number of accounts
|
||||||
accounts = acfactory.get_many_online_accounts(3)
|
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
|
# put a bigfile into each account
|
||||||
for acc in accounts:
|
for acc in accounts:
|
||||||
acc.bigfile = os.path.join(acc.get_blobdir(), "bigfile")
|
acc.bigfile = os.path.join(acc.get_blobdir(), "bigfile")
|
||||||
with open(acc.bigfile, "wb") as f:
|
with open(acc.bigfile, "wb") as f:
|
||||||
f.write(b"01234567890" * 1000_000)
|
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]
|
contact_addrs = [acc.get_self_contact().addr for acc in accounts]
|
||||||
chat = accounts[0].create_group_chat("stress-group")
|
chat = accounts[0].create_group_chat("stress-group")
|
||||||
|
|||||||
Reference in New Issue
Block a user