Skip to content

Type errors are hard to read due to unrendered color codes #822

@stefan6419846

Description

@stefan6419846

The error messages produced by failing type checks are very hard to read as they contain coloring commands which seem not be rendered correctly and might not even make sense for writing them into log files:

[...]
spdx_tools.common.typing.constructor_type_errors.ConstructorTypeErrors: ["SetterError Package: Method\x1b[1m\x1b[35m spdx_tools.common.typing.dataclass_with_properties.make_setter.set_field()\x1b[0m parameter \x1b[1m\x1b[34mattribution_texts\x1b[0m=\x1b[1m\x1b[31m''\x1b[0m violates type hint \x1b[1m\x1b[32mlist[str]\x1b[0m, as \x1b[1m\x1b[33mstr \x1b[0m\x1b[1m\x1b[31m''\x1b[0m not instance of \x1b[1m\x1b[32mlist\x1b[0m.: "]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions