Get a list of GraphQLError instances describing each deprecated use.
513785
def find_deprecated_usages(
    schema: GraphQLSchema, ast: DocumentNode
) -> List[GraphQLError]:
    """"""

    type_info = TypeInfo(schema)
    visitor = FindDeprecatedUsages(type_info)
    visit(ast, TypeInfoVisitor(type_info, visitor))
    return visitor.errors
868960
def get_plugin_apps(self):
    
    return {
        '/infer': self._infer,
        '/update_example': self._update_example,
        '/examples_from_path': self._examples_from_path_handler,
        '/sprite': self._serve_sprite,
        '/duplicate_example': self._duplicate_example,
        '/delete_example': self._delete_example,
        '/infer_mutants': self._infer_mutants_handler,
        '/eligible_features': self._eligible_features_from_example_handler,
    }
1133675
public List<CsvError> getGlobalErrors() {
        final List<CsvError> list = new ArrayList<CsvError>();
        for(CsvError item : this.errors) {
            if(!(item instanceof CsvFieldError)) {
                list.add(item);
            }
        }
        
        return list;
    }
729712
def get_errors(self):
        
        errors = []
        errors.extend(self._get_signature_errors())
        errors.extend(self._get_additional_errors())
        errors.extend(self._get_entry_errors())

        return errors if errors else None
443680
public java.util.List<com.google.appengine.v1.ErrorHandler> getErrorHandlersList() {
    return errorHandlers_;
  }
717090
def get_possible_types(
        self, abstract_type: GraphQLAbstractType
    ) -> Sequence[GraphQLObjectType]:
        """"""
        if is_union_type(abstract_type):
            abstract_type = cast(GraphQLUnionType, abstract_type)
            return abstract_type.types
        return self._implementations[abstract_type.name]
475434
public java.util.List<? extends com.google.appengine.v1.ErrorHandlerOrBuilder> 
      getErrorHandlersOrBuilderList() {
    return errorHandlers_;
  }
793753
def count_error_types(graph: BELGraph) -> Counter:
    
    return Counter(
        exc.__class__.__name__
        for _, exc, _ in graph.warnings
    )
205830
def get_failed_requests(self, results):
        
        data = {member['guid']: member for member in results}
        for request in self.requests:
            if request['guid'] not in data:
                yield request
728292
def _get_param_names(cls):
        """"""
        # fetch the constructor or the original constructor before
        # deprecation wrapping if any
        init = getattr(cls.__init__, 'deprecated_original', cls.__init__)
        if init is object.__init__:
            # No explicit constructor to introspect
            return []

        # introspect the constructor arguments to find the model parameters
        # to represent
        init_signature = signature(init)
        # Consider the constructor parameters excluding 'self'
        parameters = [p for p in init_signature.parameters.values()
                      if p.name != 'self' and p.kind != p.VAR_KEYWORD]
        # Extract and sort argument names excluding 'self'
        parameters = set([p.name for p in parameters])

        # recurse
        for superclass in cls.__bases__:
            try:
                parameters.update(superclass._get_param_names())
            except AttributeError:
                # object and pygsp.graphs.Graph don't have this method
                pass

        return parameters
401685
@SuppressWarnings("unchecked")
    private Set<Integer> getPredecessors(Graph g, Integer vertex) {
        // The DirectedGraph cast seems to change the return type of the set
        // from Set<Integer> to just Set
        if (g instanceof DirectedGraph) {
            DirectedGraph<?> dg = (DirectedGraph)g;
            return dg.predecessors(vertex);
        }
        else {
            return g.getNeighbors(vertex);
        }
    }
992793
function getSuggestedTypeNames(
  schema: GraphQLSchema,
  type: GraphQLOutputType,
  fieldName: string,
): Array<string> {
  if (isAbstractType(type)) {
    const suggestedObjectTypes = [];
    const interfaceUsageCount = Object.create(null);
    for (const possibleType of schema.getPossibleTypes(type)) {
      if (!possibleType.getFields()[fieldName]) {
        continue;
      }
      // This object type defines this field.
      suggestedObjectTypes.push(possibleType.name);
      for (const possibleInterface of possibleType.getInterfaces()) {
        if (!possibleInterface.getFields()[fieldName]) {
          continue;
        }
        // This interface type defines this field.
        interfaceUsageCount[possibleInterface.name] =
          (interfaceUsageCount[possibleInterface.name] || 0) + 1;
      }
    }

    // Suggest interface types based on how common they are.
    const suggestedInterfaceTypes = Object.keys(interfaceUsageCount).sort(
      (a, b) => interfaceUsageCount[b] - interfaceUsageCount[a],
    );

    // Suggest both interface and object types.
    return suggestedInterfaceTypes.concat(suggestedObjectTypes);
  }

  // Otherwise, must be an Object type, which does not have possible fields.
  return [];
}
136548
def get_errors(self):
        
        return [{cr.component_name: cr.get_error()}
                for cr in self.component_results if cr.has_error()]
297795
def get_suggested_field_names(schema, graphql_type, field_name):
    """"""

    if isinstance(graphql_type, (GraphQLInterfaceType, GraphQLObjectType)):
        possible_field_names = list(graphql_type.fields.keys())

        return suggestion_list(field_name, possible_field_names)

    # Otherwise, must be a Union type, which does not define fields.
    return []
1143788
def list_records(self, rtype=None, name=None, content=None, **kwargs):
        

        if not rtype and kwargs.get('type'):
            warnings.warn('Parameter "type" is deprecated, use "rtype" instead.',
                          DeprecationWarning)
            rtype = kwargs.get('type')

        return self._list_records(rtype=rtype, name=name, content=content)
205889
def interfaces(self) -> GraphQLInterfaceList:
        """"""
        try:
            interfaces = resolve_thunk(self._interfaces)
        except GraphQLError:
            raise
        except Exception as error:
            raise TypeError(f"{self.name} interfaces cannot be resolved: {error}")
        if interfaces is None:
            interfaces = []
        if not isinstance(interfaces, (list, tuple)):
            raise TypeError(
                f"{self.name} interfaces must be a list/tuple"
                " or a function which returns a list/tuple."
            )
        if not all(isinstance(value, GraphQLInterfaceType) for value in interfaces):
            raise TypeError(f"{self.name} interfaces must be GraphQLInterface objects.")
        return interfaces[:]
568214
def get_deprecated_msg(self, wrapped, instance):
        
        if instance is None:
            if inspect.isclass(wrapped):
                fmt = "Call to deprecated class {name}."
            else:
                fmt = "Call to deprecated function (or staticmethod) {name}."
        else:
            if inspect.isclass(instance):
                fmt = "Call to deprecated class method {name}."
            else:
                fmt = "Call to deprecated method {name}."
        if self.reason:
            fmt += " ({reason})"
        if self.version:
            fmt += " -- Deprecated since version {version}."
        return fmt.format(name=wrapped.__name__,
                          reason=self.reason or "",
                          version=self.version or "")