Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/e/d/edx-ora-HEAD/controller/grader_interface.py   edx-ora(Download)
import urlparse
 
from models import Submission, GRADER_TYPE, Grader, STATUS_CODES, SubmissionState, GraderStatus
import util
import grader_util
            return util._error_response("grader type is a needed key", _INTERFACE_VERSION)
 
        if grader_type not in [i[0] for i in GRADER_TYPE]:
            return util._error_response("invalid grader type", _INTERFACE_VERSION)
 
 
        #list comprehension below just gets all available grader types ['ML','IN', etc
        if post_data['grader_type'] not in [i[0] for i in GRADER_TYPE]:
            return util._error_response("Invalid grader type {0}.".format(post_data['grader_type']),_INTERFACE_VERSION)