Commit 7b71271b by Steve Strassmann

prefix unused vars with _

parent 9b7374ab
...@@ -176,7 +176,7 @@ def import_course(request, org, course, name): ...@@ -176,7 +176,7 @@ def import_course(request, org, course, name):
# find the 'course.xml' file # find the 'course.xml' file
for dirpath, dirnames, filenames in os.walk(course_dir): for dirpath, _dirnames, filenames in os.walk(course_dir):
for files in filenames: for files in filenames:
if files == 'course.xml': if files == 'course.xml':
break break
...@@ -192,13 +192,11 @@ def import_course(request, org, course, name): ...@@ -192,13 +192,11 @@ def import_course(request, org, course, name):
for fname in os.listdir(dirpath): for fname in os.listdir(dirpath):
shutil.move(dirpath / fname, course_dir) shutil.move(dirpath / fname, course_dir)
# var module_store is unused _module_store, course_items = import_from_xml(modulestore('direct'), settings.GITHUB_REPO_ROOT,
# pylint: disable=W0612 [course_subdir], load_error_modules=False,
module_store, course_items = import_from_xml(modulestore('direct'), settings.GITHUB_REPO_ROOT, static_content_store=contentstore(),
[course_subdir], load_error_modules=False, target_location_namespace=Location(location),
static_content_store=contentstore(), draft_store=modulestore())
target_location_namespace=Location(location),
draft_store=modulestore())
# we can blow this away when we're done importing. # we can blow this away when we're done importing.
shutil.rmtree(course_dir) shutil.rmtree(course_dir)
......
...@@ -96,7 +96,7 @@ def preview_module_system(request, preview_id, descriptor): ...@@ -96,7 +96,7 @@ def preview_module_system(request, preview_id, descriptor):
return ModuleSystem( return ModuleSystem(
ajax_url=reverse('preview_dispatch', args=[preview_id, descriptor.location.url(), '']).rstrip('/'), ajax_url=reverse('preview_dispatch', args=[preview_id, descriptor.location.url(), '']).rstrip('/'),
# TODO (cpennington): Do we want to track how instructors are using the preview problems? # TODO (cpennington): Do we want to track how instructors are using the preview problems?
track_function=lambda type, event: None, track_function=lambda event_type, event: None,
filestore=descriptor.system.resources_fs, filestore=descriptor.system.resources_fs,
get_module=partial(get_preview_module, request, preview_id), get_module=partial(get_preview_module, request, preview_id),
render_template=render_from_lms, render_template=render_from_lms,
...@@ -171,7 +171,7 @@ def get_module_previews(request, descriptor): ...@@ -171,7 +171,7 @@ def get_module_previews(request, descriptor):
descriptor: An XModuleDescriptor descriptor: An XModuleDescriptor
""" """
preview_html = [] preview_html = []
for idx, (instance_state, shared_state) in enumerate(descriptor.get_sample_state()): for idx, (_instance_state, _shared_state) in enumerate(descriptor.get_sample_state()):
module = load_preview_module(request, str(idx), descriptor) module = load_preview_module(request, str(idx), descriptor)
preview_html.append(module.get_html()) preview_html.append(module.get_html())
return preview_html return preview_html
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment