Fix pylint and typos
This commit is contained in:
@@ -2,15 +2,15 @@ import json
|
||||
import logging
|
||||
from collections import defaultdict
|
||||
|
||||
from django.http import ( HttpResponse, HttpResponseBadRequest,
|
||||
HttpResponseForbidden )
|
||||
from django.http import (HttpResponse, HttpResponseBadRequest,
|
||||
HttpResponseForbidden)
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.views.decorators.http import require_http_methods
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django_future.csrf import ensure_csrf_cookie
|
||||
from django.conf import settings
|
||||
from xmodule.modulestore.exceptions import ( ItemNotFoundError,
|
||||
InvalidLocationError )
|
||||
from xmodule.modulestore.exceptions import (ItemNotFoundError,
|
||||
InvalidLocationError)
|
||||
from mitxmako.shortcuts import render_to_response
|
||||
|
||||
from xmodule.modulestore import Location
|
||||
@@ -21,8 +21,8 @@ from xblock.fields import Scope
|
||||
from util.json_request import expect_json, JsonResponse
|
||||
|
||||
from contentstore.module_info_model import get_module_info, set_module_info
|
||||
from contentstore.utils import ( get_modulestore, get_lms_link_for_item,
|
||||
compute_unit_state, UnitState, get_course_for_item )
|
||||
from contentstore.utils import (get_modulestore, get_lms_link_for_item,
|
||||
compute_unit_state, UnitState, get_course_for_item)
|
||||
|
||||
from models.settings.course_grading import CourseGradingModel
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ def import_static_content(modules, course_loc, course_data_path, static_content_
|
||||
|
||||
verbose = True
|
||||
|
||||
for dirname, dirnames, filenames in os.walk(static_dir):
|
||||
for dirname, _, filenames in os.walk(static_dir):
|
||||
for filename in filenames:
|
||||
|
||||
try:
|
||||
|
||||
@@ -99,7 +99,7 @@ class TestXBlockWrapper(object):
|
||||
if depth == 0:
|
||||
runtime.get_module.side_effect = lambda x: self.leaf_module(HtmlDescriptor)
|
||||
else:
|
||||
runtime.get_module.side_effect = lambda x: self.container_module(VerticalDescriptor, depth-1)
|
||||
runtime.get_module.side_effect = lambda x: self.container_module(VerticalDescriptor, depth - 1)
|
||||
runtime.position = 2
|
||||
return runtime
|
||||
|
||||
@@ -188,9 +188,9 @@ class TestStudioView(TestXBlockWrapper):
|
||||
|
||||
# Test that for all of the Descriptors listed in CONTAINER_XMODULES
|
||||
# render the same thing using studio_view as they do using get_html, under the following conditions:
|
||||
# a) All of its descendents are xmodules
|
||||
# b) Some of its descendents are xmodules and some are xblocks
|
||||
# c) All of its descendents are xblocks
|
||||
# a) All of its descendants are xmodules
|
||||
# b) Some of its descendants are xmodules and some are xblocks
|
||||
# c) All of its descendants are xblocks
|
||||
def test_studio_view_container_node(self):
|
||||
for descriptor_cls in CONTAINER_XMODULES:
|
||||
yield self.check_studio_view_container_node_xmodules_only, descriptor_cls
|
||||
|
||||
Reference in New Issue
Block a user