

def leave_OperationDefinition(self, operation, key, parent, path, ancestors):
    variable_name_used = set()
    usages = self.context.get_recursive_variable_usages(operation)
    op_name = ((operation.name and operation.name.value) or None)
    for variable_usage in usages:
        variable_name_used.add(variable_usage.node.name.value)
    for variable_definition in self.variable_definitions:
        if (variable_definition.variable.name.value not in variable_name_used):
            self.context.report_error(GraphQLError(self.unused_variable_message(variable_definition.variable.name.value, ancestors), [variable_definition]))

dataset/ETHPy150Open graphql-python/graphql-core/graphql/core/validation/rules/no_unused_variables.py NoUnusedVariables.leave_OperationDefinition/VarMisuse@121/173 `op_name`->`ancestors`