Use F-string repr
This commit is contained in:
@@ -100,9 +100,9 @@ class GmiiFrame:
|
|||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return (
|
return (
|
||||||
f"{type(self).__name__}(data={repr(self.data)}, "
|
f"{type(self).__name__}(data={self.data!r}, "
|
||||||
f"error={repr(self.error)}, "
|
f"error={self.error!r}, "
|
||||||
f"rx_sim_time={repr(self.rx_sim_time)})"
|
f"rx_sim_time={self.rx_sim_time!r})"
|
||||||
)
|
)
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
|
|||||||
@@ -102,10 +102,10 @@ class XgmiiFrame:
|
|||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return (
|
return (
|
||||||
f"{type(self).__name__}(data={repr(self.data)}, "
|
f"{type(self).__name__}(data={self.data!r}, "
|
||||||
f"ctrl={repr(self.ctrl)}, "
|
f"ctrl={self.ctrl!r}, "
|
||||||
f"rx_sim_time={repr(self.rx_sim_time)}, "
|
f"rx_sim_time={self.rx_sim_time!r}, "
|
||||||
f"rx_start_lane={repr(self.rx_start_lane)})"
|
f"rx_start_lane={self.rx_start_lane!r})"
|
||||||
)
|
)
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user