Skip to content
Snippets Groups Projects
Commit b81e5504 authored by Don Mitchell's avatar Don Mitchell
Browse files

Fix pylint and typos

parent fc131fa8
No related merge requests found
...@@ -2,15 +2,15 @@ import json ...@@ -2,15 +2,15 @@ import json
import logging import logging
from collections import defaultdict from collections import defaultdict
from django.http import ( HttpResponse, HttpResponseBadRequest, from django.http import (HttpResponse, HttpResponseBadRequest,
HttpResponseForbidden ) HttpResponseForbidden)
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_http_methods from django.views.decorators.http import require_http_methods
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from django.conf import settings from django.conf import settings
from xmodule.modulestore.exceptions import ( ItemNotFoundError, from xmodule.modulestore.exceptions import (ItemNotFoundError,
InvalidLocationError ) InvalidLocationError)
from mitxmako.shortcuts import render_to_response from mitxmako.shortcuts import render_to_response
from xmodule.modulestore import Location from xmodule.modulestore import Location
...@@ -21,8 +21,8 @@ from xblock.fields import Scope ...@@ -21,8 +21,8 @@ from xblock.fields import Scope
from util.json_request import expect_json, JsonResponse from util.json_request import expect_json, JsonResponse
from contentstore.module_info_model import get_module_info, set_module_info from contentstore.module_info_model import get_module_info, set_module_info
from contentstore.utils import ( get_modulestore, get_lms_link_for_item, from contentstore.utils import (get_modulestore, get_lms_link_for_item,
compute_unit_state, UnitState, get_course_for_item ) compute_unit_state, UnitState, get_course_for_item)
from models.settings.course_grading import CourseGradingModel from models.settings.course_grading import CourseGradingModel
......
...@@ -25,7 +25,7 @@ def import_static_content(modules, course_loc, course_data_path, static_content_ ...@@ -25,7 +25,7 @@ def import_static_content(modules, course_loc, course_data_path, static_content_
verbose = True verbose = True
for dirname, dirnames, filenames in os.walk(static_dir): for dirname, _, filenames in os.walk(static_dir):
for filename in filenames: for filename in filenames:
try: try:
......
...@@ -99,7 +99,7 @@ class TestXBlockWrapper(object): ...@@ -99,7 +99,7 @@ class TestXBlockWrapper(object):
if depth == 0: if depth == 0:
runtime.get_module.side_effect = lambda x: self.leaf_module(HtmlDescriptor) runtime.get_module.side_effect = lambda x: self.leaf_module(HtmlDescriptor)
else: 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 runtime.position = 2
return runtime return runtime
...@@ -188,9 +188,9 @@ class TestStudioView(TestXBlockWrapper): ...@@ -188,9 +188,9 @@ class TestStudioView(TestXBlockWrapper):
# Test that for all of the Descriptors listed in CONTAINER_XMODULES # 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: # render the same thing using studio_view as they do using get_html, under the following conditions:
# a) All of its descendents are xmodules # a) All of its descendants are xmodules
# b) Some of its descendents are xmodules and some are xblocks # b) Some of its descendants are xmodules and some are xblocks
# c) All of its descendents are xblocks # c) All of its descendants are xblocks
def test_studio_view_container_node(self): def test_studio_view_container_node(self):
for descriptor_cls in CONTAINER_XMODULES: for descriptor_cls in CONTAINER_XMODULES:
yield self.check_studio_view_container_node_xmodules_only, descriptor_cls yield self.check_studio_view_container_node_xmodules_only, descriptor_cls
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment