Skip to content

humanize_list accepts any value that can be coerced to a string for the last list item #413

@lengau

Description

@lengau

Bug Description

This should raise a TypeError but it doesn't:

>>> craft_cli.utils.humanize_list(['1', 2])
'1, and 2'

While this isn't exactly a big deal, it is an unexpected success that can mislead developers.

To Reproduce

craft_cli.utils.humanize_list(['1', 2])

part yaml

Relevant log output

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions