def expand_sig(sig):
 if isinstance(sig, tuple):
  if (len(sig) == 3):
   (num_pos_only, func, keyword_only) = sig
   assert isinstance(sig[(-1)], tuple)
  else:
   (num_pos_only, func) = sig
   keyword_only = ()
  sigspec = signature_or_spec(func)
 else:
  func = sig
  sigspec = signature_or_spec(func)
  num_pos_only = num_pos_args(sigspec)
  keyword_only = ()
 keyword_exclude = get_exclude_keywords(num_pos_only, sigspec)
 return (num_pos_only, func, (keyword_only + keyword_exclude), sigspec)

def expand_sig ( sig ) : if isinstance ( sig , tuple ) : if ( len ( sig ) == 3 ) : ( num_pos_only , func , keyword_only ) = sig assert isinstance ( sig [ ( - 1 ) ] , tuple ) else : ( num_pos_only , func ) = sig keyword_only = ( ) sigspec = signature_or_spec ( func ) else : func = sig sigspec = signature_or_spec ( func ) num_pos_only = num_pos_args ( sigspec ) keyword_only = ( ) keyword_exclude = get_exclude_keywords ( num_pos_only , sigspec ) return ( num_pos_only , func , ( keyword_only + keyword_exclude ) , sigspec )
convert the signature spec in module_info to add to signatures the input signature spec is one of: - lambda_func - - the output signature spec is: where keyword_exclude includes keyword only arguments and .