diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py
index e3929cf94d..6a83fd35eb 100644
--- a/cms/djangoapps/contentstore/features/common.py
+++ b/cms/djangoapps/contentstore/features/common.py
@@ -286,8 +286,15 @@ def _do_studio_prompt_action(intent, action):
Wait for a studio prompt to appear and press the specified action button
See cms/static/js/views/feedback_prompt.js for implementation
"""
- assert intent in ['warning', 'error', 'confirmation', 'announcement',
- 'step-required', 'help', 'mini']
+ assert intent in [
+ 'warning',
+ 'error',
+ 'confirmation',
+ 'announcement',
+ 'step-required',
+ 'help',
+ 'mini',
+ ]
assert action in ['primary', 'secondary']
world.wait_for_present('div.wrapper-prompt.is-shown#prompt-{}'.format(intent))
diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
index 9e9ed9cc7f..749f611469 100644
--- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
+++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
@@ -93,8 +93,10 @@ def click_component_from_menu(category, component_type, is_advanced):
"""
if is_advanced:
# Sometimes this click does not work if you go too fast.
- world.retry_on_exception(_click_advanced,
- ignored_exceptions=AssertionError)
+ world.retry_on_exception(
+ _click_advanced,
+ ignored_exceptions=AssertionError,
+ )
# Retry this in case the list is empty because you tried too fast.
link = world.retry_on_exception(
diff --git a/cms/djangoapps/contentstore/tests/test_i18n.py b/cms/djangoapps/contentstore/tests/test_i18n.py
index 3072bbee11..e9e1739488 100644
--- a/cms/djangoapps/contentstore/tests/test_i18n.py
+++ b/cms/djangoapps/contentstore/tests/test_i18n.py
@@ -55,9 +55,10 @@ class InternationalizationTest(ModuleStoreTestCase):
self.client = AjaxEnabledTestClient()
self.client.login(username=self.uname, password=self.password)
- resp = self.client.get_html('/course/',
- {},
- HTTP_ACCEPT_LANGUAGE='en'
+ resp = self.client.get_html(
+ '/course/',
+ {},
+ HTTP_ACCEPT_LANGUAGE='en',
)
self.assertContains(resp,
diff --git a/cms/djangoapps/contentstore/tests/test_permissions.py b/cms/djangoapps/contentstore/tests/test_permissions.py
index 0e08f1eb17..6e71d1a418 100644
--- a/cms/djangoapps/contentstore/tests/test_permissions.py
+++ b/cms/djangoapps/contentstore/tests/test_permissions.py
@@ -32,13 +32,14 @@ class TestCourseAccess(ModuleStoreTestCase):
# create a course via the view handler which has a different strategy for permissions than the factory
self.course_key = SlashSeparatedCourseKey('myu', 'mydept.mycourse', 'myrun')
course_url = reverse_url('course_handler')
- self.client.ajax_post(course_url,
+ self.client.ajax_post(
+ course_url,
{
'org': self.course_key.org,
'number': self.course_key.course,
'display_name': 'My favorite course',
'run': self.course_key.run,
- }
+ },
)
self.users = self._create_users()
diff --git a/cms/urls.py b/cms/urls.py
index bd99ae6c7e..6548044b96 100644
--- a/cms/urls.py
+++ b/cms/urls.py
@@ -104,18 +104,25 @@ js_info_dict = {
'packages': ('openassessment',),
}
-urlpatterns += patterns('',
+urlpatterns += patterns(
+ '',
# Serve catalog of localized strings to be rendered by Javascript
url(r'^i18n.js$', 'django.views.i18n.javascript_catalog', js_info_dict),
)
if settings.FEATURES.get('ENABLE_EXPORT_GIT'):
- urlpatterns += (url(r'^export_git/{}$'.format(settings.COURSE_KEY_PATTERN),
- 'contentstore.views.export_git', name='export_git'),)
+ urlpatterns += (url(
+ r'^export_git/{}$'.format(
+ settings.COURSE_KEY_PATTERN,
+ ),
+ 'contentstore.views.export_git',
+ name='export_git',
+ ),)
if settings.FEATURES.get('ENABLE_SERVICE_STATUS'):
- urlpatterns += patterns('',
+ urlpatterns += patterns(
+ '',
url(r'^status/', include('service_status.urls')),
)
diff --git a/common/djangoapps/student/tests/test_password_policy.py b/common/djangoapps/student/tests/test_password_policy.py
index 75ad3ce3ac..194de075f3 100644
--- a/common/djangoapps/student/tests/test_password_policy.py
+++ b/common/djangoapps/student/tests/test_password_policy.py
@@ -170,12 +170,14 @@ class TestPasswordPolicy(TestCase):
response = self.client.post(self.url, self.url_params)
self.assertEqual(response.status_code, 400)
obj = json.loads(response.content)
- errstring = ("Password: Must be more complex ("
+ errstring = (
+ "Password: Must be more complex ("
"must contain 3 or more uppercase characters, "
"must contain 3 or more digits, "
"must contain 3 or more punctuation characters, "
"must contain 3 or more unique words"
- ")")
+ ")"
+ )
self.assertEqual(obj['value'], errstring)
@patch.dict("django.conf.settings.PASSWORD_COMPLEXITY", {
diff --git a/common/djangoapps/terrain/stubs/tests/test_ora.py b/common/djangoapps/terrain/stubs/tests/test_ora.py
index 7b11944ed6..ffa4416311 100644
--- a/common/djangoapps/terrain/stubs/tests/test_ora.py
+++ b/common/djangoapps/terrain/stubs/tests/test_ora.py
@@ -187,7 +187,8 @@ class StubOraServiceTest(unittest.TestCase):
params={'course_id': 'test course'}
)
- self._assert_response(response,
+ self._assert_response(
+ response,
{'version': 1, 'success': True, 'problem_list': []}
)
diff --git a/common/lib/capa/capa/util.py b/common/lib/capa/capa/util.py
index 2db5024b32..e9197ad19e 100644
--- a/common/lib/capa/capa/util.py
+++ b/common/lib/capa/capa/util.py
@@ -156,7 +156,8 @@ def sanitize_html(html_code):
'audio': ['controls', 'autobuffer', 'autoplay', 'src'],
'img': ['src', 'width', 'height', 'class']
})
- output = bleach.clean(html_code,
+ output = bleach.clean(
+ html_code,
tags=bleach.ALLOWED_TAGS + ['div', 'p', 'audio', 'pre', 'img', 'span'],
styles=['white-space'],
attributes=attributes
diff --git a/common/lib/chem/chem/tests.py b/common/lib/chem/chem/tests.py
index 4f000eb3f2..4087016e41 100644
--- a/common/lib/chem/chem/tests.py
+++ b/common/lib/chem/chem/tests.py
@@ -2,8 +2,12 @@ import codecs
from fractions import Fraction
import unittest
-from .chemcalc import (compare_chemical_expression, divide_chemical_expression,
- render_to_html, chemical_equations_equal)
+from .chemcalc import (
+ compare_chemical_expression,
+ divide_chemical_expression,
+ render_to_html,
+ chemical_equations_equal,
+)
import miller
@@ -36,8 +40,12 @@ class Test_Compare_Equations(unittest.TestCase):
self.assertTrue(chemical_equations_equal('H2 + O2 -> H2O2',
'2O2 + 2H2 -> 2H2O2'))
- self.assertFalse(chemical_equations_equal('2H2 + O2 -> H2O2',
- '2O2 + 2H2 -> 2H2O2'))
+ self.assertFalse(
+ chemical_equations_equal(
+ '2H2 + O2 -> H2O2',
+ '2O2 + 2H2 -> 2H2O2',
+ )
+ )
def test_different_arrows(self):
self.assertTrue(chemical_equations_equal('H2 + O2 -> H2O2',
@@ -50,8 +58,13 @@ class Test_Compare_Equations(unittest.TestCase):
self.assertTrue(chemical_equations_equal('H2 + O2 -> H2O2',
'2O2 + 2H2 -> 2H2O2'))
- self.assertFalse(chemical_equations_equal('H2 + O2 -> H2O2',
- '2O2 + 2H2 -> 2H2O2', exact=True))
+ self.assertFalse(
+ chemical_equations_equal(
+ 'H2 + O2 -> H2O2',
+ '2O2 + 2H2 -> 2H2O2',
+ exact=True,
+ )
+ )
# order still doesn't matter
self.assertTrue(chemical_equations_equal('H2 + O2 -> H2O2',
diff --git a/common/lib/sandbox-packages/verifiers/draganddrop.py b/common/lib/sandbox-packages/verifiers/draganddrop.py
index 9a3a000902..3a00478a7d 100644
--- a/common/lib/sandbox-packages/verifiers/draganddrop.py
+++ b/common/lib/sandbox-packages/verifiers/draganddrop.py
@@ -352,8 +352,10 @@ class DragAndDrop(object):
# correct_answer entries. If the draggable is mentioned in at least one
# correct_answer entry, the value is False.
# default to consider every user answer excess until proven otherwise.
- self.excess_draggables = dict((users_draggable.keys()[0], True)
- for users_draggable in user_answer)
+ self.excess_draggables = dict(
+ (users_draggable.keys()[0], True)
+ for users_draggable in user_answer
+ )
# Convert nested `user_answer` to flat format.
user_answer = flat_user_answer(user_answer)
diff --git a/common/lib/xmodule/xmodule/annotatable_module.py b/common/lib/xmodule/xmodule/annotatable_module.py
index 9c27357dc0..5eacfad07e 100644
--- a/common/lib/xmodule/xmodule/annotatable_module.py
+++ b/common/lib/xmodule/xmodule/annotatable_module.py
@@ -34,7 +34,8 @@ class AnnotatableFields(object):
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut sodales laoreet est, egestas gravida felis egestas nec. Aenean at volutpat erat. Cras commodo viverra nibh in aliquam.
Nulla facilisi. Pellentesque id vestibulum libero. Suspendisse potenti. Morbi scelerisque nisi vitae felis dictum mattis. Nam sit amet magna elit. Nullam volutpat cursus est, sit amet sagittis odio vulputate et. Curabitur euismod, orci in vulputate imperdiet, augue lorem tempor purus, id aliquet augue turpis a est. Aenean a sagittis libero. Praesent fringilla pretium magna, non condimentum risus elementum nec. Pellentesque faucibus elementum pharetra. Pellentesque vitae metus eros.
- """))
+ """)
+ )
display_name = String(
display_name=_("Display Name"),
help=_("Display name for this module"),
diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py
index a6e8d5bf36..03b1f217d5 100644
--- a/common/lib/xmodule/xmodule/combined_open_ended_module.py
+++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py
@@ -259,10 +259,12 @@ class CombinedOpenEndedFields(object):
scope=Scope.settings
)
extended_due = Date(
- help=_("Date that this problem is due by for a particular student. This "
- "can be set by an instructor, and will override the global due "
- "date if it is set to a date that is later than the global due "
- "date."),
+ help=_(
+ "Date that this problem is due by for a particular student. This "
+ "can be set by an instructor, and will override the global due "
+ "date if it is set to a date that is later than the global due "
+ "date."
+ ),
default=None,
scope=Scope.user_state,
)
@@ -315,9 +317,11 @@ class CombinedOpenEndedFields(object):
)
peer_grade_finished_submissions_when_none_pending = Boolean(
display_name=_('Allow "overgrading" of peer submissions'),
- help=_("EXPERIMENTAL FEATURE. Allow students to peer grade submissions that already have the requisite number of graders, "
- "but ONLY WHEN all submissions they are eligible to grade already have enough graders. "
- "This is intended for use when settings for `Required Peer Grading` > `Peer Graders per Response`"),
+ help=_(
+ "EXPERIMENTAL FEATURE. Allow students to peer grade submissions that already have the requisite number of graders, "
+ "but ONLY WHEN all submissions they are eligible to grade already have enough graders. "
+ "This is intended for use when settings for `Required Peer Grading` > `Peer Graders per Response`"
+ ),
default=False,
scope=Scope.settings,
)
diff --git a/common/lib/xmodule/xmodule/graders.py b/common/lib/xmodule/xmodule/graders.py
index c1339c2009..b5e0e1ba9f 100644
--- a/common/lib/xmodule/xmodule/graders.py
+++ b/common/lib/xmodule/xmodule/graders.py
@@ -359,8 +359,10 @@ class AssignmentFormatGrader(CourseGrader):
# if there is only one entry in a section, suppress the existing individual entry and the average,
# and just display a single entry for the section. That way it acts automatically like a
# SingleSectionGrader.
- total_detail = u"{section_type} = {percent:.0%}".format(percent=total_percent,
- section_type=self.section_type)
+ total_detail = u"{section_type} = {percent:.0%}".format(
+ percent=total_percent,
+ section_type=self.section_type,
+ )
total_label = u"{short_label}".format(short_label=self.short_label)
breakdown = [{'percent': total_percent, 'label': total_label,
'detail': total_detail, 'category': self.category, 'prominent': True}, ]
diff --git a/common/lib/xmodule/xmodule/imageannotation_module.py b/common/lib/xmodule/xmodule/imageannotation_module.py
index 60d31fcfe4..013d5c405a 100644
--- a/common/lib/xmodule/xmodule/imageannotation_module.py
+++ b/common/lib/xmodule/xmodule/imageannotation_module.py
@@ -19,7 +19,8 @@ _ = lambda text: text
class AnnotatableFields(object):
""" Fields for `ImageModule` and `ImageDescriptor`. """
- data = String(help=_("XML data for the annotation"),
+ data = String(
+ help=_("XML data for the annotation"),
scope=Scope.content,
default=textwrap.dedent("""\
diff --git a/common/lib/xmodule/xmodule/tests/test_course_module.py b/common/lib/xmodule/xmodule/tests/test_course_module.py
index ab15eb3a17..5083c79845 100644
--- a/common/lib/xmodule/xmodule/tests/test_course_module.py
+++ b/common/lib/xmodule/xmodule/tests/test_course_module.py
@@ -75,9 +75,16 @@ def get_dummy_course(start, announcement=None, is_new=None, advertised_start=Non
Two houses, ...
- '''.format(org=ORG, course=COURSE, start=start, is_new=is_new,
- announcement=announcement, advertised_start=advertised_start, end=end,
- certs=certs)
+ '''.format(
+ org=ORG,
+ course=COURSE,
+ start=start,
+ is_new=is_new,
+ announcement=announcement,
+ advertised_start=advertised_start,
+ end=end,
+ certs=certs,
+ )
return system.process_xml(start_xml)
diff --git a/common/lib/xmodule/xmodule/textannotation_module.py b/common/lib/xmodule/xmodule/textannotation_module.py
index 662637f7c3..8006006b4e 100644
--- a/common/lib/xmodule/xmodule/textannotation_module.py
+++ b/common/lib/xmodule/xmodule/textannotation_module.py
@@ -17,7 +17,8 @@ _ = lambda text: text
class AnnotatableFields(object):
"""Fields for `TextModule` and `TextDescriptor`."""
- data = String(help=_("XML data for the annotation"),
+ data = String(
+ help=_("XML data for the annotation"),
scope=Scope.content,
default=textwrap.dedent("""\
diff --git a/common/lib/xmodule/xmodule/videoannotation_module.py b/common/lib/xmodule/xmodule/videoannotation_module.py
index 78ac023af4..9e84c0711e 100644
--- a/common/lib/xmodule/xmodule/videoannotation_module.py
+++ b/common/lib/xmodule/xmodule/videoannotation_module.py
@@ -19,7 +19,8 @@ _ = lambda text: text
class AnnotatableFields(object):
""" Fields for `VideoModule` and `VideoDescriptor`. """
- data = String(help=_("XML data for the annotation"),
+ data = String(
+ help=_("XML data for the annotation"),
scope=Scope.content,
default=textwrap.dedent("""\
diff --git a/common/test/acceptance/tests/test_ora.py b/common/test/acceptance/tests/test_ora.py
index d3ca5611a8..149a23f511 100644
--- a/common/test/acceptance/tests/test_ora.py
+++ b/common/test/acceptance/tests/test_ora.py
@@ -68,14 +68,32 @@ class OpenResponseTest(UniqueCourseTest):
XBlockFixtureDesc('chapter', 'Test Section').add_children(
XBlockFixtureDesc('sequential', 'Test Subsection').add_children(
- XBlockFixtureDesc('combinedopenended', 'Self-Assessed',
- data=load_data_str('ora_self_problem.xml'), metadata={'graded': True}),
+ XBlockFixtureDesc(
+ 'combinedopenended',
+ 'Self-Assessed',
+ data=load_data_str('ora_self_problem.xml'),
+ metadata={
+ 'graded': True,
+ },
+ ),
- XBlockFixtureDesc('combinedopenended', 'AI-Assessed',
- data=load_data_str('ora_ai_problem.xml'), metadata={'graded': True}),
+ XBlockFixtureDesc(
+ 'combinedopenended',
+ 'AI-Assessed',
+ data=load_data_str('ora_ai_problem.xml'),
+ metadata={
+ 'graded': True,
+ },
+ ),
- XBlockFixtureDesc('combinedopenended', self.peer_problem_name,
- data=load_data_str('ora_peer_problem.xml'), metadata={'graded': True}),
+ XBlockFixtureDesc(
+ 'combinedopenended',
+ self.peer_problem_name,
+ data=load_data_str('ora_peer_problem.xml'),
+ metadata={
+ 'graded': True,
+ },
+ ),
# This is the interface a student can use to grade his/her peers
XBlockFixtureDesc('peergrading', 'Peer Module'),
diff --git a/docs/en_us/developers/source/conf.py b/docs/en_us/developers/source/conf.py
index 8b90c36f88..5ddf43fc2a 100644
--- a/docs/en_us/developers/source/conf.py
+++ b/docs/en_us/developers/source/conf.py
@@ -47,8 +47,14 @@ sys.path.append(root / "lms/djangoapps")
sys.path.append(root / "lms/lib")
sys.path.append(root / "cms/djangoapps")
sys.path.append(root / "cms/lib")
-sys.path.insert(0, os.path.abspath(os.path.normpath(os.path.dirname(__file__)
- + '/../../../')))
+sys.path.insert(
+ 0,
+ os.path.abspath(
+ os.path.normpath(
+ os.path.dirname(__file__) + '/../../../'
+ )
+ )
+)
sys.path.append('.')
# django configuration - careful here
diff --git a/docs/en_us/platform_api/source/conf.py b/docs/en_us/platform_api/source/conf.py
index 1993e41cff..f26bc95ef5 100644
--- a/docs/en_us/platform_api/source/conf.py
+++ b/docs/en_us/platform_api/source/conf.py
@@ -39,8 +39,14 @@ sys.path.append(root / "lms/djangoapps/mobile_api/course_info")
sys.path.append(root / "lms/djangoapps/mobile_api/users")
sys.path.append(root / "lms/djangoapps/mobile_api/video_outlines")
-sys.path.insert(0, os.path.abspath(os.path.normpath(os.path.dirname(__file__)
- + '/../../../')))
+sys.path.insert(
+ 0,
+ os.path.abspath(
+ os.path.normpath(
+ os.path.dirname(__file__) + '/../../../'
+ )
+ )
+)
sys.path.append('.')
# django configuration - careful here
diff --git a/lms/djangoapps/courseware/tests/helpers.py b/lms/djangoapps/courseware/tests/helpers.py
index d0bf1bc45c..a6e7cd9568 100644
--- a/lms/djangoapps/courseware/tests/helpers.py
+++ b/lms/djangoapps/courseware/tests/helpers.py
@@ -34,8 +34,11 @@ class LoginEnrollmentTestCase(TestCase):
self.email = 'foo@test.com'
self.password = 'bar'
self.username = 'test'
- self.user = self.create_account(self.username,
- self.email, self.password)
+ self.user = self.create_account(
+ self.username,
+ self.email,
+ self.password,
+ )
self.activate_user(self.email)
self.login(self.email, self.password)
diff --git a/lms/djangoapps/courseware/tests/test_navigation.py b/lms/djangoapps/courseware/tests/test_navigation.py
index 6b5dbe41a3..d9b36ebd01 100644
--- a/lms/djangoapps/courseware/tests/test_navigation.py
+++ b/lms/djangoapps/courseware/tests/test_navigation.py
@@ -50,8 +50,10 @@ class TestNavigation(ModuleStoreTestCase, LoginEnrollmentTestCase):
self.tabssection = ItemFactory.create(parent=self.chapterchrome,
display_name='tabs',
chrome='tabs')
- self.defaultchromesection = ItemFactory.create(parent=self.chapterchrome,
- display_name='defaultchrome')
+ self.defaultchromesection = ItemFactory.create(
+ parent=self.chapterchrome,
+ display_name='defaultchrome',
+ )
self.fullchromesection = ItemFactory.create(parent=self.chapterchrome,
display_name='fullchrome',
chrome='accordion,tabs')
diff --git a/lms/djangoapps/courseware/tests/test_progress.py b/lms/djangoapps/courseware/tests/test_progress.py
index a70cbe4b9a..743f936e68 100644
--- a/lms/djangoapps/courseware/tests/test_progress.py
+++ b/lms/djangoapps/courseware/tests/test_progress.py
@@ -6,45 +6,55 @@ from mock import MagicMock
class ProgessTests(TestCase):
def setUp(self):
- self.d = dict({'duration_total': 0,
- 'duration_watched': 0,
- 'done': True,
- 'questions_correct': 4,
- 'questions_incorrect': 0,
- 'questions_total': 0})
+ self.d = dict({
+ 'duration_total': 0,
+ 'duration_watched': 0,
+ 'done': True,
+ 'questions_correct': 4,
+ 'questions_incorrect': 0,
+ 'questions_total': 0,
+ })
self.c = progress.completion()
self.c2 = progress.completion()
- self.c2.dict = dict({'duration_total': 0,
- 'duration_watched': 0,
- 'done': True,
- 'questions_correct': 2,
- 'questions_incorrect': 1,
- 'questions_total': 0})
+ self.c2.dict = dict({
+ 'duration_total': 0,
+ 'duration_watched': 0,
+ 'done': True,
+ 'questions_correct': 2,
+ 'questions_incorrect': 1,
+ 'questions_total': 0,
+ })
- self.cplusc2 = dict({'duration_total': 0,
- 'duration_watched': 0,
- 'done': True,
- 'questions_correct': 2,
- 'questions_incorrect': 1,
- 'questions_total': 0})
+ self.cplusc2 = dict({
+ 'duration_total': 0,
+ 'duration_watched': 0,
+ 'done': True,
+ 'questions_correct': 2,
+ 'questions_incorrect': 1,
+ 'questions_total': 0,
+ })
- self.oth = dict({'duration_total': 0,
- 'duration_watched': 0,
- 'done': True,
- 'questions_correct': 4,
- 'questions_incorrect': 0,
- 'questions_total': 7})
+ self.oth = dict({
+ 'duration_total': 0,
+ 'duration_watched': 0,
+ 'done': True,
+ 'questions_correct': 4,
+ 'questions_incorrect': 0,
+ 'questions_total': 7,
+ })
self.x = MagicMock()
self.x.dict = self.oth
- self.d_oth = {'duration_total': 0,
- 'duration_watched': 0,
- 'done': True,
- 'questions_correct': 4,
- 'questions_incorrect': 0,
- 'questions_total': 7}
+ self.d_oth = {
+ 'duration_total': 0,
+ 'duration_watched': 0,
+ 'done': True,
+ 'questions_correct': 4,
+ 'questions_incorrect': 0,
+ 'questions_total': 7,
+ }
def test_getitem(self):
self.assertEqual(self.c.__getitem__('duration_watched'), 0)
diff --git a/lms/djangoapps/instructor_task/subtasks.py b/lms/djangoapps/instructor_task/subtasks.py
index 6280213e76..32c0b06f2d 100644
--- a/lms/djangoapps/instructor_task/subtasks.py
+++ b/lms/djangoapps/instructor_task/subtasks.py
@@ -301,8 +301,13 @@ def queue_subtasks_for_query(entry, action_name, create_subtask_fcn, item_querys
subtask_id_list = [str(uuid4()) for _ in range(total_num_subtasks)]
# Update the InstructorTask with information about the subtasks we've defined.
- TASK_LOG.info("Task %s: updating InstructorTask %s with subtask info for %s subtasks to process %s items.",
- task_id, entry.id, total_num_subtasks, total_num_items) # pylint: disable=E1101
+ TASK_LOG.info(
+ "Task %s: updating InstructorTask %s with subtask info for %s subtasks to process %s items.",
+ task_id,
+ entry.id,
+ total_num_subtasks,
+ total_num_items,
+ ) # pylint: disable=E1101
progress = initialize_subtask_info(entry, action_name, total_num_items, subtask_id_list)
# Construct a generator that will return the recipients to use for each subtask.
@@ -317,8 +322,12 @@ def queue_subtasks_for_query(entry, action_name, create_subtask_fcn, item_querys
)
# Now create the subtasks, and start them running.
- TASK_LOG.info("Task %s: creating %s subtasks to process %s items.",
- task_id, total_num_subtasks, total_num_items)
+ TASK_LOG.info(
+ "Task %s: creating %s subtasks to process %s items.",
+ task_id,
+ total_num_subtasks,
+ total_num_items,
+ )
num_subtasks = 0
for item_list in item_list_generator:
subtask_id = subtask_id_list[num_subtasks]
diff --git a/lms/djangoapps/open_ended_grading/open_ended_notifications.py b/lms/djangoapps/open_ended_grading/open_ended_notifications.py
index 798e6ad91d..01267d8b9c 100644
--- a/lms/djangoapps/open_ended_grading/open_ended_notifications.py
+++ b/lms/djangoapps/open_ended_grading/open_ended_notifications.py
@@ -198,8 +198,12 @@ def set_value_in_cache(student_id, course_id, notification_type, value):
def create_key_name(student_id, course_id, notification_type):
- key_name = u"{prefix}{type}_{course}_{student}".format(prefix=KEY_PREFIX, type=notification_type, course=course_id,
- student=student_id)
+ key_name = u"{prefix}{type}_{course}_{student}".format(
+ prefix=KEY_PREFIX,
+ type=notification_type,
+ course=course_id,
+ student=student_id,
+ )
return key_name