Node: use f-string for repr

This commit is contained in:
Ronny Pfannschmidt 2023-11-14 10:30:52 +01:00
parent bbe6b4a218
commit 2eda3e36fe
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ class Node(abc.ABC, metaclass=NodeMeta):
return self.session.gethookproxy(self.path) return self.session.gethookproxy(self.path)
def __repr__(self) -> str: def __repr__(self) -> str:
return "<{} {}>".format(self.__class__.__name__, getattr(self, "name", None)) return f'<{self.__class__.__name__} { getattr(self, "name", None)}>'
def warn(self, warning: Warning) -> None: def warn(self, warning: Warning) -> None:
"""Issue a warning for this Node. """Issue a warning for this Node.