import typing from source import structures class UntrustedPeerException(Exception): def __init__(self, peer: typing.Optional[structures.Peer]): super().__init__(f"Peer not trusted: {peer}")