python: use f-strings instead of percent-encoding

This commit is contained in:
link2xt
2023-02-15 16:33:05 +00:00
parent b3ecbbc8b3
commit 4f68e94fb3
3 changed files with 3 additions and 3 deletions

View File

@@ -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]

View File

@@ -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

View File

@@ -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)