add 2 more instances of formatting violations

This commit is contained in:
Jonathan de Jong 2019-12-19 18:09:47 +01:00
parent b1248ff315
commit 0827d0d9ef
2 changed files with 4 additions and 3 deletions

View File

@ -56,7 +56,7 @@ class ID:
return self._b58_str
def __repr__(self) -> str:
return f"<libp2p.peer.id.ID ({self.to_string()})>"
return f"<libp2p.peer.id.ID ({self!s})>"
__str__ = pretty = to_string = to_base58

View File

@ -541,10 +541,11 @@ class Pubsub:
await self.validate_msg(msg_forwarder, msg)
except ValidationError:
logger.debug(
"Topic validation failed: sender %s sent data %s under topic IDs: %s",
f"{base58.b58encode(msg.from_id).decode()}:{msg.seqno.hex()}",
"Topic validation failed: sender %s sent data %s under topic IDs: %s %s:%s",
msg.data.hex(),
msg.topicIDs,
base58.b58encode(msg.from_id).decode(),
msg.seqno.hex(),
)
return