src/canvas-extractor/tests/data_generation/sections.py
def load_sections(course: Course, sections: List[Dict]) -> List[Section]:
    """
    Load a list of sections for a course via the Canvas API.

    Parameters
    ----------
    course: Course
        A Course SDK object
    sections: List[Dict]
        A list of JSON-like section objects in a form suitable for submission to the
        Canvas section creation endpoint.

    Returns
    -------
    List[Section]
        A list of Canvas SDK Section objects representing the created sections
    """
    logger.info("Creating %s sections via Canvas API", len(sections))

    result: List[Section] = []
    for section in sections:
        result.append(course.create_course_section(**section))

    logger.info("Successfully created %s sections", len(sections))

    return result

    Load a list of sections for a course via the Canvas API.

    Parameters
    ----------
    course: Course
        A Course SDK object
    sections: List[Dict]
        A list of JSON-like section objects in a form suitable for submission to the
        Canvas section creation endpoint.

    Returns
    -------
    List[Section]
        A list of Canvas SDK Section objects representing the created sections
    
Load a list of sections for a course via the Canvas API.
Parameters

Course
A Course SDK object
sections: List[Dict]
A list of JSON-like section objects in a form suitable for submission to the
Canvas section creation endpoint.

Returns

List[Section]
A list of Canvas SDK Section objects representing the created sections
Load a list of sections for a course via the Canvas API . Parameters Course A Course SDK object sections : List [ Dict ] A list of JSON - like section objects in a form suitable for submission to the Canvas section creation endpoint . Returns List [ Section ] A list of Canvas SDK Section objects representing the created sections
def load_sections(course: Course, sections: List[Dict]) -> List[Section]:
    logger.info("Creating %s sections via Canvas API", len(sections))
    result: List[Section] = []
    for section in sections:
        result.append(course.create_course_section(**section))
    logger.info("Successfully created %s sections", len(sections))
    return result
def load_sections ( course : Course , sections : List [ Dict ] ) -> List [ Section ] : logger . info ( "Creating %s sections via Canvas API" , len ( sections ) ) result : List [ Section ] = [ ] for section in sections : result . append ( course . create_course_section ( ** section ) ) logger . info ( "Successfully created %s sections" , len ( sections ) ) return result
Load a list of sections for a course via the Canvas API.
Load a list of sections for a course via the Canvas API .
"""
    Load a list of sections for a course via the Canvas API.

    Parameters
    ----------
    course: Course
        A Course SDK object
    sections: List[Dict]
        A list of JSON-like section objects in a form suitable for submission to the
        Canvas section creation endpoint.

    Returns
    -------
    List[Section]
        A list of Canvas SDK Section objects representing the created sections
    """
course
Course
sections
List[Dict]