get_trait_typehint

On this page

get_trait_typehint#

get_trait_typehint(trait, mode='short', aliases=None)#

Return the typehint corresponding to a trait object.

Parameters:
  • trait (Any) – Trait instance. Also accept any other type of object.

  • mode (str) – If “short”, add a ~ in front of the full typehint to only print the type name but still have a link. If minimal, only keep the name. If anything else, return the fully qualified link.

  • aliases (Mapping[str, str] | None)

Return type:

str