chore: modernize f-string usage (#627)

This commit is contained in:
Pavol Rusnak
2024-10-04 14:11:00 +02:00
committed by GitHub
parent 4d8b6a7a74
commit 75ffa39807
23 changed files with 54 additions and 59 deletions

View File

@@ -133,7 +133,7 @@ async def test_db_get_connection(ledger: Ledger):
# )
# except Exception as exc:
# # this is expected to raise
# raise Exception(f"conn2: {str(exc)}")
# raise Exception(f"conn2: {exc}")
# except Exception as exc:
# if str(exc).startswith("conn2"):
@@ -174,12 +174,12 @@ async def test_db_get_connection_lock_row(wallet: Wallet, ledger: Ledger):
)
except Exception as exc:
# this is expected to raise
raise Exception(f"conn2: {str(exc)}")
raise Exception(f"conn2: {exc}")
except Exception as exc:
if "conn2" in str(exc):
raise exc
else:
raise Exception(f"not expected to happen: {str(exc)}")
raise Exception(f"not expected to happen: {exc}")
await assert_err(get_connection(), "failed to acquire database lock")
@@ -280,13 +280,13 @@ async def test_db_get_connection_lock_different_row(wallet: Wallet, ledger: Ledg
except Exception as exc:
# this is expected to raise
raise Exception(f"conn2: {str(exc)}")
raise Exception(f"conn2: {exc}")
except Exception as exc:
if "conn2" in str(exc):
raise exc
else:
raise Exception(f"not expected to happen: {str(exc)}")
raise Exception(f"not expected to happen: {exc}")
await get_connection2()