Merge bitcoin/bitcoin#31417: test: Avoid F541 (f-string without any placeholders)

fae76393bd test: Avoid F541 (f-string without any placeholders) (MarcoFalke)

Pull request description:

  An extra `f` string-prefix is mostly harmless, but could be confusing or hint to a mistake where a format argument was forgotten.

  Try to avoid the confusion and mistakes by applying the `F541` linter rule.

ACKs for top commit:
  lucasbalieiro:
    **Tested ACK** [fae7639](fae76393bd)
  danielabrozzoni:
    ACK fae76393bd
  tdb3:
    Code review ACK fae76393bd

Tree-SHA512: 4992a74fcf0c19b32e4d95f7333e087b4269b5c5259c556789fb86721617db81c7a4fe210ae136c92824976f07f71ad0f374655e7008b1967c02c73324862d9a
This commit is contained in:
merge-script
2024-12-06 10:26:58 +00:00
19 changed files with 30 additions and 29 deletions

View File

@@ -327,7 +327,7 @@ class CAddress:
elif self.net == self.NET_CJDNS:
self.ip = socket.inet_ntop(socket.AF_INET6, addr_bytes)
else:
raise Exception(f"Address type not supported")
raise Exception("Address type not supported")
self.port = int.from_bytes(f.read(2), "big")
@@ -354,7 +354,7 @@ class CAddress:
elif self.net == self.NET_CJDNS:
r += socket.inet_pton(socket.AF_INET6, self.ip)
else:
raise Exception(f"Address type not supported")
raise Exception("Address type not supported")
r += self.port.to_bytes(2, "big")
return r

View File

@@ -195,7 +195,7 @@ class Socks5Connection():
if not self.serv.keep_alive:
self.conn.close()
else:
logger.debug(f"Keeping client connection alive")
logger.debug("Keeping client connection alive")
class Socks5Server():
def __init__(self, conf):