[CHORE] string formatting default length 88 (#1887)

* [CHORE] string formatting default length 88

uses blacks default off 88 and enabled autostringformatting

* formatting

* nitpicks jackstar

fix
This commit is contained in:
dni ⚡
2023-08-24 10:26:09 +01:00
committed by GitHub
parent 2ab18544c3
commit 4e6f229db2
34 changed files with 245 additions and 160 deletions
+9 -5
View File
@@ -55,13 +55,16 @@ class ClicheWallet(Wallet):
description_hash_str = (
description_hash.hex()
if description_hash
else hashlib.sha256(unhashed_description).hexdigest()
if unhashed_description
else None
else (
hashlib.sha256(unhashed_description).hexdigest()
if unhashed_description
else None
)
)
ws = create_connection(self.endpoint)
ws.send(
f"create-invoice --msatoshi {amount*1000} --description_hash {description_hash_str}"
f"create-invoice --msatoshi {amount*1000} --description_hash"
f" {description_hash_str}"
)
r = ws.recv()
else:
@@ -172,7 +175,8 @@ class ClicheWallet(Wallet):
continue
except Exception as exc:
logger.error(
f"lost connection to cliche's invoices stream: '{exc}', retrying in 5 seconds"
f"lost connection to cliche's invoices stream: '{exc}', retrying in"
" 5 seconds"
)
await asyncio.sleep(5)
continue