Closed
Description
Describe the bug
We are using __ str __ method of Message class in the logging of our project and found out that when there are frames with short and extended Arbitration IDs, short ID ("ID: dddd") is justed to the right of its' column which makes the ID column distorted.
The "ID: " part for both short and extended AIDs is not in the same vertical line.
To Reproduce
- create a logger which logs each CAN frame with Arbitration IDs with different lengths as str(can.Message)
- create a virtual CAN bus
- send some CAN frames
Expected behavior
Change arbitration_id_string.rjust() to arbitration_id_string.ljust in line 116 of can/message.py
Lines 110 to 116 in c5d7a7c
Additional context
OS and version: Windows 10 Enterprise 21H2
Python version: 3.10
python-can version: 4.1.0