hw_todo/tests/SpyRoutes.py
def delete(id):
    """
    (DELETE)
    Deletes the given assignment
    """
    existing_tasks = db_canvas["Tasks"]
    task_location = ""
    task_to_delete = {}
    for x in range(len(db_canvas["Tasks"])):
        if existing_tasks[x]["Canvas ID"] == id:
            task_location = x
            task_to_delete = existing_tasks[x]

    if task_to_delete == {}:
        return {"ERROR": "ID Not Found"}

    try:
        db_canvas["Tasks"].pop(task_location)
        return db_canvas
    except:
        return 'There was a problem deleting that task'

    (DELETE)
    Deletes the given assignment
    
(DELETE)
Deletes the given assignment
( DELETE ) Deletes the given assignment
def delete(id):
    existing_tasks = db_canvas["Tasks"]
    task_location = ""
    task_to_delete = {}
    for x in range(len(db_canvas["Tasks"])):
        if existing_tasks[x]["Canvas ID"] == id:
            task_location = x
            task_to_delete = existing_tasks[x]
    if task_to_delete == {}:
        return {"ERROR": "ID Not Found"}
    try:
        db_canvas["Tasks"].pop(task_location)
        return db_canvas
    except:
        return 'There was a problem deleting that task'
def delete ( id ) : existing_tasks = db_canvas [ "Tasks" ] task_location = "" task_to_delete = { } for x in range ( len ( db_canvas [ "Tasks" ] ) ) : if existing_tasks [ x ] [ "Canvas ID" ] == id : task_location = x task_to_delete = existing_tasks [ x ] if task_to_delete == { } : return { "ERROR" : "ID Not Found" } try : db_canvas [ "Tasks" ] . pop ( task_location ) return db_canvas except : return 'There was a problem deleting that task'
(DELETE)
Deletes the given assignment
( DELETE ) Deletes the given assignment
"""
    (DELETE)
    Deletes the given assignment
    """
id