increase readability by using f-strings (#1597)

* increase readability by using f-strings

* readd merge conflict stuff

---------

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
Pavol Rusnak
2023-04-03 15:34:17 +02:00
committed by GitHub
co-authored by calle
parent 58c3b05e29
commit 689c443d72
9 changed files with 33 additions and 57 deletions
+2 -2
View File
@@ -171,7 +171,7 @@ def lnencode(addr, privkey):
else:
amount = addr.currency if addr.currency else ""
hrp = "ln" + amount + "0n"
hrp = f"ln{amount}0n"
# Start with the timestamp
data = bitstring.pack("uint:35", addr.date)
@@ -257,7 +257,7 @@ class LnAddr:
def __str__(self):
pubkey = bytes.hex(self.pubkey.serialize()).decode()
tags = ", ".join([k + "=" + str(v) for k, v in self.tags])
tags = ", ".join([f"{k}={v}" for k, v in self.tags])
return f"LnAddr[{pubkey}, amount={self.amount}{self.currency} tags=[{tags}]]"