Skip to main content

humanize_type

Converts a technical type string into a human-readable format by looking it up in a predefined mapping or replacing hyphens with spaces.

def humanize_type(
type: string
) - > string

Converts a technical type identifier into a human-readable string by looking up a mapping or formatting the raw string.

Parameters

NameTypeDescription
typestringThe raw type identifier or slug to be converted into a readable format.

Returns

TypeDescription
stringThe human-friendly version of the type name, with hyphens replaced by spaces if no specific mapping exists.