def normalise_alias_format_string(alias_format):
 display = None
 representation = []
 if isinstance(alias_format, six.string_types):
  display = alias_format
  representation.append(alias_format)
 elif isinstance(alias_format, dict):
  display = alias_format.get('display')
  representation = (alias_format.get('representation') or [])
  if isinstance(representation, six.string_types):
   representation = [representation]
 else:
  raise TypeError(("alias_format '%s' is neither a dictionary or string type." % repr(alias_format)))
 return (display, representation)

def normalise_alias_format_string ( alias_format ) : display = None representation = [ ] if isinstance ( alias_format , six . string_types ) : display = alias_format representation . append ( alias_format ) elif isinstance ( alias_format , dict ) : display = alias_format . get ( 'display' ) representation = ( alias_format . get ( 'representation' ) or [ ] ) if isinstance ( representation , six . string_types ) : representation = [ representation ] else : raise TypeError ( ( "alias_format '%s' is neither a dictionary or string type." % repr ( alias_format ) ) ) return ( display , representation )
stackstorm action aliases come in two forms; 1 .