ros2doctor.api.format module

class ros2doctor.api.format.CustomWarningFormat

Bases: object

Support custom warning format without modifying default format.

ros2doctor.api.format.compute_padding(report_items: List[Tuple[str, str]]) int

Compute padding based on report content.

Parameters:

report_items – list of item name and item content tuple

Returns:

padding number

ros2doctor.api.format.custom_warning_format(msg, cat, filename, linenum, file=None, line=None)
ros2doctor.api.format.doctor_error(msg: str) None

Print customized error message with package and line info.

Parameters:

msg – error message to be printed

ros2doctor.api.format.doctor_warn(msg: str) None

Print customized warning message with package and line info.

Parameters:

msg – warning message to be printed

ros2doctor.api.format.format_print(report)

Format print report content.

Parameters:

report – Report object with name and items list