Node: use f-string for repr
This commit is contained in:
parent
bbe6b4a218
commit
2eda3e36fe
|
@ -238,7 +238,7 @@ class Node(abc.ABC, metaclass=NodeMeta):
|
|||
return self.session.gethookproxy(self.path)
|
||||
|
||||
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:
|
||||
"""Issue a warning for this Node.
|
||||
|
|
Loading…
Reference in New Issue