mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
python: use f-strings instead of percent-encoding
This commit is contained in:
@@ -45,7 +45,7 @@ git_describe_command = "git describe --dirty --tags --long --match py-*.*"
|
||||
line-length = 120
|
||||
|
||||
[tool.ruff]
|
||||
select = ["E", "F", "W", "YTT", "C4", "ISC", "ICN", "TID", "DTZ", "PLC", "PLE", "PLW", "PIE", "COM", "UP004", "UP010", "UP032"]
|
||||
select = ["E", "F", "W", "YTT", "C4", "ISC", "ICN", "TID", "DTZ", "PLC", "PLE", "PLW", "PIE", "COM", "UP004", "UP010", "UP031", "UP032"]
|
||||
line-length = 120
|
||||
|
||||
[tool.isort]
|
||||
|
||||
@@ -301,7 +301,7 @@ class Account:
|
||||
elif isinstance(obj, str):
|
||||
displayname, addr = parseaddr(obj)
|
||||
else:
|
||||
raise TypeError("don't know how to create chat for %r" % (obj,))
|
||||
raise TypeError(f"don't know how to create chat for {obj!r}")
|
||||
|
||||
if name is None and displayname:
|
||||
name = displayname
|
||||
|
||||
@@ -14,7 +14,7 @@ def test_db_busy_error(acfactory, tmpdir):
|
||||
|
||||
def log(string):
|
||||
with log_lock:
|
||||
print("%3.2f %s" % (time.time() - starttime, string))
|
||||
print(f"{time.time() - starttime:3.2f} {string}")
|
||||
|
||||
# make a number of accounts
|
||||
accounts = acfactory.get_many_online_accounts(3)
|
||||
|
||||
Reference in New Issue
Block a user