From ed584a9abb11644ccf67857045343cec338a6701 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Thu, 15 Aug 2013 12:41:30 -0400 Subject: [PATCH] fix pep8 violations --- cms/djangoapps/contentstore/views/preview.py | 2 +- common/lib/xmodule/xmodule/modulestore/__init__.py | 2 +- .../modulestore/tests/test_split_modulestore.py | 11 ++++++----- common/lib/xmodule/xmodule/modulestore/xml.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index 75ee59dd2d..7a3a224d86 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -160,7 +160,7 @@ def load_preview_module(request, preview_id, descriptor): module.get_html = replace_static_urls( module.get_html, getattr(module, 'data_dir', module.location.course), - course_id=module.location.org+'/'+module.location.course+'/BOGUS_RUN_REPLACE_WHEN_AVAILABLE' + course_id=module.location.org + '/' + module.location.course + '/BOGUS_RUN_REPLACE_WHEN_AVAILABLE' ) module.get_html = save_module( diff --git a/common/lib/xmodule/xmodule/modulestore/__init__.py b/common/lib/xmodule/xmodule/modulestore/__init__.py index a7e29ed105..eb9c44a441 100644 --- a/common/lib/xmodule/xmodule/modulestore/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/__init__.py @@ -395,7 +395,7 @@ class ModuleStore(object): def get_modulestore_type(self, course_id): """ - Returns a type which identifies which modulestore is servicing the given + Returns a type which identifies which modulestore is servicing the given course_id. The return can be either "xml" (for XML based courses) or "mongo" for MongoDB backed courses """ raise NotImplementedError diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py index c217646725..d548dcc838 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py @@ -298,14 +298,15 @@ class SplitModuleItemTests(SplitModuleTest): # in published course locator = BlockUsageLocator(course_id="wonderful", usage_id="head23456", branch='draft') - self.assertTrue(modulestore().has_item(locator.course_id, BlockUsageLocator(course_id=locator.course_id, - usage_id=locator.usage_id, - branch='published')), - "couldn't find in 23456") + self.assertTrue( + modulestore().has_item( + locator.course_id, + BlockUsageLocator(course_id=locator.course_id, usage_id=locator.usage_id, branch='published') + ), "couldn't find in 23456" + ) locator.branch = 'published' self.assertTrue(modulestore().has_item(course_id, locator), "couldn't find in 23456") - def test_negative_has_item(self): # negative tests--not found # no such course or block diff --git a/common/lib/xmodule/xmodule/modulestore/xml.py b/common/lib/xmodule/xmodule/modulestore/xml.py index fd04982f81..89c3299394 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml.py +++ b/common/lib/xmodule/xmodule/modulestore/xml.py @@ -604,7 +604,7 @@ class XMLModuleStore(ModuleStoreBase): def get_modulestore_type(self, course_id): """ - Returns a type which identifies which modulestore is servicing the given + Returns a type which identifies which modulestore is servicing the given course_id. The return can be either "xml" (for XML based courses) or "mongo" for MongoDB backed courses """ return XML_MODULESTORE_TYPE