def has_known_bases(klass):
 try:
  return klass._all_bases_known
 except AttributeError:
  pass
 for base in klass.bases:
  result = safe_infer(base)
  if ((not isinstance(result, astroid.Class)) or (result is klass) or (not has_known_bases(result))):
   klass._all_bases_known = False
   return False
 klass._all_bases_known = True
 return True

def has_known_bases ( klass ) : try : return klass . _all_bases_known except AttributeError : pass for base in klass . bases : result = safe_infer ( base ) if ( ( not isinstance ( result , astroid . Class ) ) or ( result is klass ) or ( not has_known_bases ( result ) ) ) : klass . _all_bases_known = False return False klass . _all_bases_known = True return True
returns true if all base classes of a class could be inferred .