Commit 5a69fead by stv

Fix PEP8: E123 closing bracket does not match

indentation of opening bracket's line
parent 55de42d1
...@@ -58,7 +58,7 @@ class InternationalizationTest(ModuleStoreTestCase): ...@@ -58,7 +58,7 @@ class InternationalizationTest(ModuleStoreTestCase):
resp = self.client.get_html('/course/', resp = self.client.get_html('/course/',
{}, {},
HTTP_ACCEPT_LANGUAGE='en' HTTP_ACCEPT_LANGUAGE='en'
) )
self.assertContains(resp, self.assertContains(resp,
'<h1 class="page-header">My Courses</h1>', '<h1 class="page-header">My Courses</h1>',
......
...@@ -47,7 +47,7 @@ class TestStatus(TestCase): ...@@ -47,7 +47,7 @@ class TestStatus(TestCase):
(global_only, "Hello, Globe", "Hello, Globe", "Hello, Globe"), (global_only, "Hello, Globe", "Hello, Globe", "Hello, Globe"),
(toy_only, None, "A toy story", None), (toy_only, None, "A toy story", None),
(global_and_toy, "Hello, Globe", "Hello, Globe<br>A toy story", "Hello, Globe"), (global_and_toy, "Hello, Globe", "Hello, Globe<br>A toy story", "Hello, Globe"),
] ]
def setUp(self): def setUp(self):
""" """
......
...@@ -21,7 +21,7 @@ class Command(BaseCommand): ...@@ -21,7 +21,7 @@ class Command(BaseCommand):
dest='remove', dest='remove',
default=False, default=False,
help='Remove the user from the group instead of adding it'), help='Remove the user from the group instead of adding it'),
) )
args = '<user|email> <group>' args = '<user|email> <group>'
help = 'Add a user to a group' help = 'Add a user to a group'
......
...@@ -12,7 +12,7 @@ class Command(BaseCommand): ...@@ -12,7 +12,7 @@ class Command(BaseCommand):
dest='unset', dest='unset',
default=False, default=False,
help='Set is_staff to False instead of True'), help='Set is_staff to False instead of True'),
) )
args = '<user|email> [user|email ...]>' args = '<user|email> [user|email ...]>'
help = """ help = """
......
...@@ -27,12 +27,12 @@ class UserStandingMiddleware(object): ...@@ -27,12 +27,12 @@ class UserStandingMiddleware(object):
'Your account has been disabled. If you believe ' 'Your account has been disabled. If you believe '
'this was done in error, please contact us at ' 'this was done in error, please contact us at '
'{link_start}{support_email}{link_end}' '{link_start}{support_email}{link_end}'
).format( ).format(
support_email=settings.DEFAULT_FEEDBACK_EMAIL, support_email=settings.DEFAULT_FEEDBACK_EMAIL,
link_start=u'<a href="mailto:{address}?subject={subject_line}">'.format( link_start=u'<a href="mailto:{address}?subject={subject_line}">'.format(
address=settings.DEFAULT_FEEDBACK_EMAIL, address=settings.DEFAULT_FEEDBACK_EMAIL,
subject_line=_('Disabled Account'), subject_line=_('Disabled Account'),
), ),
link_end=u'</a>' link_end=u'</a>'
) )
return HttpResponseForbidden(msg) return HttpResponseForbidden(msg)
...@@ -25,7 +25,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase): ...@@ -25,7 +25,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase):
(COURSE_ID_SPLIT, SlashSeparatedCourseKey.from_deprecated_string(COURSE_ID_SPLIT)), (COURSE_ID_SPLIT, SlashSeparatedCourseKey.from_deprecated_string(COURSE_ID_SPLIT)),
(COURSE_ID_MONGO, CourseLocator.from_string(COURSE_ID_MONGO)), (COURSE_ID_MONGO, CourseLocator.from_string(COURSE_ID_MONGO)),
(COURSE_ID_SPLIT, CourseLocator.from_string(COURSE_ID_SPLIT)), (COURSE_ID_SPLIT, CourseLocator.from_string(COURSE_ID_SPLIT)),
) )
@patch.dict("django.conf.settings.FEATURES", {"AUTOMATIC_AUTH_FOR_TESTING": True}) @patch.dict("django.conf.settings.FEATURES", {"AUTOMATIC_AUTH_FOR_TESTING": True})
def setUp(self): def setUp(self):
......
...@@ -81,7 +81,7 @@ class StubCommentsServiceHandler(StubHttpRequestHandler): ...@@ -81,7 +81,7 @@ class StubCommentsServiceHandler(StubHttpRequestHandler):
"collection": user_threads, "collection": user_threads,
"page": page, "page": page,
"num_pages": num_pages "num_pages": num_pages
}) })
else: else:
self.send_response(404, content="404 Not Found") self.send_response(404, content="404 Not Found")
......
...@@ -124,7 +124,7 @@ class StubLtiHandler(StubHttpRequestHandler): ...@@ -124,7 +124,7 @@ class StubLtiHandler(StubHttpRequestHandler):
'Content-Type': 'application/xml', 'Content-Type': 'application/xml',
'X-Requested-With': 'XMLHttpRequest', 'X-Requested-With': 'XMLHttpRequest',
'Authorization': self._oauth_sign(url, data) 'Authorization': self._oauth_sign(url, data)
} }
# Send request ignoring verifirecation of SSL certificate # Send request ignoring verifirecation of SSL certificate
response = requests.post(url, data=data, headers=headers, verify=False) response = requests.post(url, data=data, headers=headers, verify=False)
......
...@@ -526,8 +526,7 @@ class StubOraService(StubHttpService): ...@@ -526,8 +526,7 @@ class StubOraService(StubHttpService):
'num_graded': self.DUMMY_DATA['problem_list_num_graded'], 'num_graded': self.DUMMY_DATA['problem_list_num_graded'],
'num_pending': self.DUMMY_DATA['problem_list_num_pending'], 'num_pending': self.DUMMY_DATA['problem_list_num_pending'],
'num_required': self.DUMMY_DATA['problem_list_num_required'] 'num_required': self.DUMMY_DATA['problem_list_num_required']
} for location, name in self.problems.items() } for location, name in self.problems.items()]
]
def register_problem(self, location, name): def register_problem(self, location, name):
""" """
......
...@@ -2121,7 +2121,8 @@ class CodeResponse(LoncapaResponse): ...@@ -2121,7 +2121,8 @@ class CodeResponse(LoncapaResponse):
if not parsed: if not parsed:
log.error("Unable to parse external grader message as valid" log.error("Unable to parse external grader message as valid"
" XML: score_msg['msg']=%s", msg) " XML: score_msg['msg']=%s", msg
)
return fail return fail
return (True, score_result['correct'], score_result['score'], msg) return (True, score_result['correct'], score_result['score'], msg)
......
...@@ -442,7 +442,8 @@ class CourseFields(object): ...@@ -442,7 +442,8 @@ class CourseFields(object):
"action_url": "SettingsDetails", "action_url": "SettingsDetails",
"action_text": _("Edit Course Schedule &amp; Details"), "action_text": _("Edit Course Schedule &amp; Details"),
"action_external": False}]} "action_external": False}]}
]) ]
)
info_sidebar_name = String( info_sidebar_name = String(
display_name=_("Course Info Sidebar Name"), display_name=_("Course Info Sidebar Name"),
help=_("Enter the heading that you want students to see above your course handouts on the Course Info page. Your course handouts appear in the right panel of the page."), help=_("Enter the heading that you want students to see above your course handouts on the Course Info page. Your course handouts appear in the right panel of the page."),
......
...@@ -319,7 +319,7 @@ class PeerGradingModuleLinkedTest(unittest.TestCase, DummyModulestore): ...@@ -319,7 +319,7 @@ class PeerGradingModuleLinkedTest(unittest.TestCase, DummyModulestore):
'use_for_single_location': True, 'use_for_single_location': True,
'link_to_location': self.coe_location.to_deprecated_string(), 'link_to_location': self.coe_location.to_deprecated_string(),
'graded': True, 'graded': True,
}) })
@property @property
def scope_ids(self): def scope_ids(self):
......
...@@ -147,7 +147,8 @@ class CourseNavPage(PageObject): ...@@ -147,7 +147,8 @@ class CourseNavPage(PageObject):
# It *would* make sense to always get the HTML, but unfortunately # It *would* make sense to always get the HTML, but unfortunately
# the open tab has some child <span> tags that we don't want. # the open tab has some child <span> tags that we don't want.
return self.q( return self.q(
css=subsection_css).map( css=subsection_css
).map(
lambda el: el.text.strip().split('\n')[0] if el.is_displayed() else el.get_attribute('innerHTML').strip() lambda el: el.text.strip().split('\n')[0] if el.is_displayed() else el.get_attribute('innerHTML').strip()
).results ).results
......
...@@ -80,7 +80,9 @@ class OpenResponseTest(UniqueCourseTest): ...@@ -80,7 +80,9 @@ class OpenResponseTest(UniqueCourseTest):
# This is the interface a student can use to grade his/her peers # This is the interface a student can use to grade his/her peers
XBlockFixtureDesc('peergrading', 'Peer Module'), XBlockFixtureDesc('peergrading', 'Peer Module'),
))).install() )
)
).install()
# Configure the XQueue stub's response for the text we will submit # Configure the XQueue stub's response for the text we will submit
# The submission text is unique so we can associate each response with a particular test case. # The submission text is unique so we can associate each response with a particular test case.
......
...@@ -134,7 +134,7 @@ MOCK_MODULES = [ ...@@ -134,7 +134,7 @@ MOCK_MODULES = [
'yaml', 'yaml',
'webob', 'webob',
'webob.multidict', 'webob.multidict',
] ]
if on_rtd: if on_rtd:
for mod_name in MOCK_MODULES: for mod_name in MOCK_MODULES:
......
...@@ -126,7 +126,7 @@ MOCK_MODULES = [ ...@@ -126,7 +126,7 @@ MOCK_MODULES = [
'yaml', 'yaml',
'webob', 'webob',
'webob.multidict', 'webob.multidict',
] ]
if on_rtd: if on_rtd:
for mod_name in MOCK_MODULES: for mod_name in MOCK_MODULES:
......
...@@ -32,7 +32,7 @@ def create_cert_course(): ...@@ -32,7 +32,7 @@ def create_cert_course():
min_price=16, min_price=16,
suggested_prices='32,64,128', suggested_prices='32,64,128',
currency='usd', currency='usd',
) )
def register(): def register():
......
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