Skip to content

Commit

Permalink
Modernize Peer.__str__
Browse files Browse the repository at this point in the history
To please ruff
  • Loading branch information
qstokkink committed Nov 26, 2024
1 parent 446e7b9 commit 077dc52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipv8/peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,4 @@ def __str__(self) -> str:
"""
Represent this peer as a human-readable string.
"""
return 'Peer<%s:%d, %s>' % (self.address[0], self.address[1], b64encode(self.mid).decode('utf-8'))
return f"Peer<{self.address[0]}:{self.address[1]}, {b64encode(self.mid).decode()}>"

0 comments on commit 077dc52

Please sign in to comment.