def _infer_decorator_callchain(node):
 if (not isinstance(node, Function)):
  return
 if (not node.parent):
  return
 try:
  result = next(node.infer_call_result(node.parent))
 except (StopIteration, InferenceError):
  return
 if isinstance(result, Instance):
  result = result._proxied
 if isinstance(result, Class):
  if result.is_subtype_of(('%s.classmethod' % BUILTINS)):
   return 'classmethod'
  if result.is_subtype_of(('%s.staticmethod' % BUILTINS)):
   return 'staticmethod'

def _infer_decorator_callchain ( node ) : if ( not isinstance ( node , Function ) ) : return if ( not node . parent ) : return try : result = next ( node . infer_call_result ( node . parent ) ) except ( StopIteration , InferenceError ) : return if isinstance ( result , Instance ) : result = result . _proxied if isinstance ( result , Class ) : if result . is_subtype_of ( ( '%s.classmethod' % BUILTINS ) ) : return 'classmethod' if result . is_subtype_of ( ( '%s.staticmethod' % BUILTINS ) ) : return 'staticmethod'
detect decorator call chaining and see if the end result is a static or a classmethod .