def _function_type(self):
 if self.decorators:
  for node in self.decorators.nodes:
   if isinstance(node, CallFunc):
    try:
     current = next(node.func.infer())
    except InferenceError:
     continue
    _type = _infer_decorator_callchain(current)
    if (_type is not None):
     return _type
   try:
    for infered in node.infer():
     _type = _infer_decorator_callchain(infered)
     if (_type is not None):
      return _type
     if (not isinstance(infered, Class)):
      continue
     for ancestor in infered.ancestors():
      if (not isinstance(ancestor, Class)):
       continue
      if ancestor.is_subtype_of(('%s.classmethod' % BUILTINS)):
       return 'classmethod'
      elif ancestor.is_subtype_of(('%s.staticmethod' % BUILTINS)):
       return 'staticmethod'
   except InferenceError:
    pass
 return self._type

def _function_type ( self ) : if self . decorators : for node in self . decorators . nodes : if isinstance ( node , CallFunc ) : try : current = next ( node . func . infer ( ) ) except InferenceError : continue _type = _infer_decorator_callchain ( current ) if ( _type is not None ) : return _type try : for infered in node . infer ( ) : _type = _infer_decorator_callchain ( infered ) if ( _type is not None ) : return _type if ( not isinstance ( infered , Class ) ) : continue for ancestor in infered . ancestors ( ) : if ( not isinstance ( ancestor , Class ) ) : continue if ancestor . is_subtype_of ( ( '%s.classmethod' % BUILTINS ) ) : return 'classmethod' elif ancestor . is_subtype_of ( ( '%s.staticmethod' % BUILTINS ) ) : return 'staticmethod' except InferenceError : pass return self . _type
function type .