Commit a883a9cd by Sarina Canelake

Merge pull request #5925 from stvstnfrd/pep8/continuation

Fix continuation-related PEP8 issues
parents 7b3602e3 5e1c5df3
......@@ -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))
......
......@@ -52,19 +52,13 @@ def see_a_multi_step_component(step, category):
world.wait_for(lambda _: len(world.css_find(selector)) == len(step.hashes))
for idx, step_hash in enumerate(step.hashes):
if category == 'HTML':
html_matcher = {
'Text':
'\n \n',
'Announcement':
'<p> Words of encouragement! This is a short note that most students will read. </p>',
'Zooming Image':
'<h2>ZOOMING DIAGRAMS</h2>',
'E-text Written in LaTeX':
'<h2>Example: E-text page</h2>',
'Raw HTML':
'<p>This template is similar to the Text template. The only difference is',
'Text': '\n \n',
'Announcement': '<p> Words of encouragement! This is a short note that most students will read. </p>',
'Zooming Image': '<h2>ZOOMING DIAGRAMS</h2>',
'E-text Written in LaTeX': '<h2>Example: E-text page</h2>',
'Raw HTML': '<p>This template is similar to the Text template. The only difference is',
}
actual_html = world.css_html(selector, index=idx)
assert_in(html_matcher[step_hash['Component']], actual_html)
......
......@@ -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(
......
......@@ -24,7 +24,8 @@ def i_export_the_course(step):
@step('I edit and enter bad XML$')
def i_enter_bad_xml(step):
enter_xml_in_advanced_problem(step,
enter_xml_in_advanced_problem(
step,
"""<problem><h1>Smallest Canvas</h1>
<p>You want to make the smallest canvas you can.</p>
<multiplechoiceresponse>
......
......@@ -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/',
resp = self.client.get_html(
'/course/',
{},
HTTP_ACCEPT_LANGUAGE='en'
HTTP_ACCEPT_LANGUAGE='en',
)
self.assertContains(resp,
......
......@@ -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()
......
......@@ -191,7 +191,7 @@ def _upload_asset(request, course_key):
# first let's see if a thumbnail can be created
(thumbnail_content, thumbnail_location) = contentstore().generate_thumbnail(
content,
tempfile_path=tempfile_path
tempfile_path=tempfile_path,
)
# delete cached thumbnail even if one couldn't be created this time (else
......
......@@ -387,10 +387,13 @@ def course_listing(request):
'run': uca.course_key.run,
'is_failed': True if uca.state == CourseRerunUIStateManager.State.FAILED else False,
'is_in_progress': True if uca.state == CourseRerunUIStateManager.State.IN_PROGRESS else False,
'dismiss_link':
reverse_course_url('course_notifications_handler', uca.course_key, kwargs={
'dismiss_link': reverse_course_url(
'course_notifications_handler',
uca.course_key,
kwargs={
'action_state_id': uca.id,
}) if uca.state == CourseRerunUIStateManager.State.FAILED else ''
},
) if uca.state == CourseRerunUIStateManager.State.FAILED else ''
}
# remove any courses in courses that are also in the in_process_course_actions list
......@@ -456,10 +459,13 @@ def course_index(request, course_key):
'rerun_notification_id': current_action.id if current_action else None,
'course_release_date': course_release_date,
'settings_url': settings_url,
'notification_dismiss_url':
reverse_course_url('course_notifications_handler', current_action.course_key, kwargs={
'notification_dismiss_url': reverse_course_url(
'course_notifications_handler',
current_action.course_key,
kwargs={
'action_state_id': current_action.id,
}) if current_action else None,
},
) if current_action else None,
})
......
......@@ -14,7 +14,8 @@ class CourseMetadata(object):
# The list of fields that wouldn't be shown in Advanced Settings.
# Should not be used directly. Instead the filtered_list method should be used if the field needs to be filtered
# depending on the feature flag.
FILTERED_LIST = ['xml_attributes',
FILTERED_LIST = [
'xml_attributes',
'start',
'end',
'enrollment_start',
......@@ -30,7 +31,7 @@ class CourseMetadata(object):
'user_partitions',
'name', # from xblock
'tags', # from xblock
'visible_to_staff_only'
'visible_to_staff_only',
]
@classmethod
......
......@@ -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')),
)
......
......@@ -219,9 +219,11 @@ def get_cohort(user, course_key):
return None
try:
return CourseUserGroup.objects.get(course_id=course_key,
return CourseUserGroup.objects.get(
course_id=course_key,
group_type=CourseUserGroup.COHORT,
users__id=user.id)
users__id=user.id,
)
except CourseUserGroup.DoesNotExist:
# Didn't find the group. We'll go on to create one if needed.
pass
......
......@@ -24,8 +24,11 @@ class CourseUserGroup(models.Model):
# Note: groups associated with particular runs of a course. E.g. Fall 2012 and Spring
# 2013 versions of 6.00x will have separate groups.
course_id = CourseKeyField(max_length=255, db_index=True,
help_text="Which course is this group associated with?")
course_id = CourseKeyField(
max_length=255,
db_index=True,
help_text="Which course is this group associated with?",
)
# For now, only have group type 'cohort', but adding a type field to support
# things like 'question_discussion', 'friends', 'off-line-class', etc
......
......@@ -67,7 +67,7 @@ class Role(models.Model):
def inherit_permissions(self, role): # TODO the name of this method is a little bit confusing,
# since it's one-off and doesn't handle inheritance later
if role.course_id and role.course_id != self.course_id:
logging.warning("%s cannot inherit permissions from %s due to course_id inconsistency", \
logging.warning("%s cannot inherit permissions from %s due to course_id inconsistency",
self, role)
for per in role.permissions.all():
self.add_permission(per)
......
......@@ -46,8 +46,10 @@ class CountryMiddlewareTests(TestCase):
return ip_dict.get(ip_addr, 'US')
def test_country_code_added(self):
request = self.request_factory.get('/somewhere',
HTTP_X_FORWARDED_FOR='117.79.83.1')
request = self.request_factory.get(
'/somewhere',
HTTP_X_FORWARDED_FOR='117.79.83.1',
)
request.user = self.authenticated_user
self.session_middleware.process_request(request)
# No country code exists before request.
......@@ -59,8 +61,10 @@ class CountryMiddlewareTests(TestCase):
self.assertEqual('117.79.83.1', request.session.get('ip_address'))
def test_ip_address_changed(self):
request = self.request_factory.get('/somewhere',
HTTP_X_FORWARDED_FOR='4.0.0.0')
request = self.request_factory.get(
'/somewhere',
HTTP_X_FORWARDED_FOR='4.0.0.0',
)
request.user = self.anonymous_user
self.session_middleware.process_request(request)
request.session['country_code'] = 'CN'
......@@ -71,8 +75,10 @@ class CountryMiddlewareTests(TestCase):
self.assertEqual('4.0.0.0', request.session.get('ip_address'))
def test_ip_address_is_not_changed(self):
request = self.request_factory.get('/somewhere',
HTTP_X_FORWARDED_FOR='117.79.83.1')
request = self.request_factory.get(
'/somewhere',
HTTP_X_FORWARDED_FOR='117.79.83.1',
)
request.user = self.anonymous_user
self.session_middleware.process_request(request)
request.session['country_code'] = 'CN'
......@@ -83,8 +89,10 @@ class CountryMiddlewareTests(TestCase):
self.assertEqual('117.79.83.1', request.session.get('ip_address'))
def test_same_country_different_ip(self):
request = self.request_factory.get('/somewhere',
HTTP_X_FORWARDED_FOR='117.79.83.100')
request = self.request_factory.get(
'/somewhere',
HTTP_X_FORWARDED_FOR='117.79.83.100',
)
request.user = self.anonymous_user
self.session_middleware.process_request(request)
request.session['country_code'] = 'CN'
......
......@@ -7,8 +7,7 @@ from django.core.cache import get_cache
class Command(NoArgsCommand):
help = \
'''Import the specified data directory into the default ModuleStore'''
help = 'Import the specified data directory into the default ModuleStore'
def handle_noargs(self, **options):
staticfiles_cache = get_cache('staticfiles')
......
......@@ -18,14 +18,13 @@ from student.models import UserProfile
class Command(BaseCommand):
help = \
'''Exports all users and user profiles.
help = """Exports all users and user profiles.
Caveat: Should be looked over before any run
for schema changes.
Current version grabs user_keys from
django.contrib.auth.models.User and up_keys
from student.userprofile. '''
from student.userprofile."""
def handle(self, *args, **options):
users = list(User.objects.all())
......
......@@ -39,14 +39,13 @@ def import_user(u):
class Command(BaseCommand):
help = \
'''Exports all users and user profiles.
help = """Exports all users and user profiles.
Caveat: Should be looked over before any run
for schema changes.
Current version grabs user_keys from
django.contrib.auth.models.User and up_keys
from student.userprofile. '''
from student.userprofile."""
def handle(self, *args, **options):
extracted = json.load(open('transfer_users.txt'))
......
......@@ -6,6 +6,7 @@ from student.models import UserTestGroup
import random
import sys
import datetime
from textwrap import dedent
import json
from pytz import UTC
......@@ -25,16 +26,15 @@ def group_from_value(groups, v):
class Command(BaseCommand):
help = \
''' Assign users to test groups. Takes a list
of groups:
a:0.3,b:0.4,c:0.3 file.txt "Testing something"
Will assign each user to group a, b, or c with
probability 0.3, 0.4, 0.3. Probabilities must
add up to 1.
Will log what happened to file.txt.
'''
help = dedent("""\
Assign users to test groups. Takes a list of groups:
a:0.3,b:0.4,c:0.3 file.txt "Testing something"
Will assign each user to group a, b, or c with
probability 0.3, 0.4, 0.3. Probabilities must
add up to 1.
Will log what happened to file.txt.
""")
def handle(self, *args, **options):
if len(args) != 3:
......
......@@ -3,8 +3,7 @@ from django.contrib.auth.models import User
class Command(BaseCommand):
help = \
''' Extract an e-mail list of all active students. '''
help = 'Extract an e-mail list of all active students.'
def handle(self, *args, **options):
#text = open(args[0]).read()
......
......@@ -8,10 +8,7 @@ import lms.lib.comment_client as cc
class Command(BaseCommand):
help = \
'''
Sync all user ids, usernames, and emails to the discussion
service'''
help = 'Sync all user ids, usernames, and emails to the discussion service'
def handle(self, *args, **options):
for user in User.objects.all().iterator():
......
......@@ -7,26 +7,25 @@ from student.models import UserProfile
class Command(BaseCommand):
help = \
''' Extract full user information into a JSON file.
Pass a single filename.'''
help = """Extract full user information into a JSON file.
Pass a single filename."""
def handle(self, *args, **options):
f = open(args[0], 'w')
#text = open(args[0]).read()
#subject = open(args[1]).read()
file_output = open(args[0], 'w')
users = User.objects.all()
l = []
data_list = []
for user in users:
up = UserProfile.objects.get(user=user)
d = {'username': user.username,
profile = UserProfile.objects.get(user=user)
data = {
'username': user.username,
'email': user.email,
'is_active': user.is_active,
'joined': user.date_joined.isoformat(),
'name': up.name,
'language': up.language,
'location': up.location}
l.append(d)
json.dump(l, f)
f.close()
'name': profile.name,
'language': profile.language,
'location': profile.location,
}
data_list.append(data)
json.dump(data_list, file_output)
file_output.close()
......@@ -26,13 +26,11 @@ class UserStandingMiddleware(object):
msg = _(
'Your account has been disabled. If you believe '
'this was done in error, please contact us at '
'{link_start}{support_email}{link_end}'
'{support_email}'
).format(
support_email=settings.DEFAULT_FEEDBACK_EMAIL,
link_start=u'<a href="mailto:{address}?subject={subject_line}">'.format(
support_email=u'<a href="mailto:{address}?subject={subject_line}">{address}</a>'.format(
address=settings.DEFAULT_FEEDBACK_EMAIL,
subject_line=_('Disabled Account'),
),
link_end=u'</a>'
)
return HttpResponseForbidden(msg)
......@@ -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", {
......
......@@ -526,8 +526,7 @@ class StubOraService(StubHttpService):
'num_graded': self.DUMMY_DATA['problem_list_num_graded'],
'num_pending': self.DUMMY_DATA['problem_list_num_pending'],
'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):
"""
......
......@@ -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': []}
)
......
......@@ -59,8 +59,10 @@ class TrackMiddleware(object):
if string in get_dict:
get_dict[string] = '*' * 8
event = {'GET': dict(get_dict),
'POST': dict(post_dict)}
event = {
'GET': dict(get_dict),
'POST': dict(post_dict),
}
# TODO: Confirm no large file uploads
event = json.dumps(event)
......
......@@ -24,15 +24,20 @@ class TagRegistry(object):
if len(cls.tags) == 0:
raise ValueError("No tags specified for class {0}".format(cls.__name__))
for t in cls.tags:
if t in self._mapping:
other_cls = self._mapping[t]
for tag in cls.tags:
if tag in self._mapping:
other_cls = self._mapping[tag]
if cls == other_cls:
# registering the same class multiple times seems silly, but ok
continue
raise ValueError("Tag {0} already registered by class {1}."
" Can't register for class {2}"
.format(t, other_cls.__name__, cls.__name__))
raise ValueError(
"Tag {0} already registered by class {1}."
" Can't register for class {2}".format(
tag,
other_cls.__name__,
cls.__name__,
)
)
# Ok, should be good to change state now.
for t in cls.tags:
......
......@@ -2120,8 +2120,11 @@ class CodeResponse(LoncapaResponse):
parsed = False
if not parsed:
log.error("Unable to parse external grader message as valid"
" XML: score_msg['msg']=%s", msg)
log.error(
"Unable to parse external grader message as valid"
" XML: score_msg['msg']=%s",
msg,
)
return fail
return (True, score_result['correct'], score_result['score'], msg)
......
......@@ -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
......
......@@ -339,8 +339,12 @@ def divide_chemical_expression(s1, s2, ignore_state=False):
if treedic['1 phases'] != treedic['2 phases']:
return False
if any(map(lambda x, y: x / y - treedic['1 factors'][0] / treedic['2 factors'][0],
treedic['1 factors'], treedic['2 factors'])):
if any(
[
x / y - treedic['1 factors'][0] / treedic['2 factors'][0]
for (x, y) in zip(treedic['1 factors'], treedic['2 factors'])
]
):
# factors are not proportional
return False
else:
......
......@@ -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',
......
......@@ -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)
......@@ -368,7 +370,8 @@ class DragAndDrop(object):
if draggable_name in answer['draggables']:
user_groups_data.append(draggable_name)
user_positions_data.append(
draggable_dict[draggable_name])
draggable_dict[draggable_name]
)
# proved that this is not excess
self.excess_draggables[draggable_name] = False
......
......@@ -15,9 +15,10 @@ _ = lambda text: text
class AnnotatableFields(object):
data = String(help=_("XML data for the annotation"), scope=Scope.content,
default=textwrap.dedent(
"""\
data = String(
help=_("XML data for the annotation"),
scope=Scope.content,
default=textwrap.dedent("""
<annotatable>
<instructions>
<p>Enter your (optional) instructions for the exercise in HTML format.</p>
......@@ -33,7 +34,8 @@ class AnnotatableFields(object):
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <annotation title="My title" body="My comment" highlight="yellow" problem="0">Ut sodales laoreet est, egestas gravida felis egestas nec.</annotation> Aenean at volutpat erat. Cras commodo viverra nibh in aliquam.</p>
<p>Nulla facilisi. <annotation body="Basic annotation example." problem="1">Pellentesque id vestibulum libero.</annotation> 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.</p>
</annotatable>
"""))
""")
)
display_name = String(
display_name=_("Display Name"),
help=_("Display name for this module"),
......
......@@ -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 "
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."),
"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, "
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`"),
"This is intended for use when settings for `Required Peer Grading` > `Peer Graders per Response`"
),
default=False,
scope=Scope.settings,
)
......
......@@ -328,121 +328,175 @@ class CourseFields(object):
scope=Scope.settings
)
has_children = True
checklists = List(scope=Scope.settings,
checklists = List(
scope=Scope.settings,
default=[
{"short_description": _("Getting Started With Studio"),
"items": [{"short_description": _("Add Course Team Members"),
{
"short_description": _("Getting Started With Studio"),
"items": [
{
"short_description": _("Add Course Team Members"),
"long_description": _("Grant your collaborators permission to edit your course so you can work together."),
"is_checked": False,
"action_url": "ManageUsers",
"action_text": _("Edit Course Team"),
"action_external": False},
{"short_description": _("Set Important Dates for Your Course"),
"action_external": False,
},
{
"short_description": _("Set Important Dates for Your Course"),
"long_description": _("Establish your course's student enrollment and launch dates on the Schedule and Details page."),
"is_checked": False,
"action_url": "SettingsDetails",
"action_text": _("Edit Course Details &amp; Schedule"),
"action_external": False},
{"short_description": _("Draft Your Course's Grading Policy"),
"action_external": False,
},
{
"short_description": _("Draft Your Course's Grading Policy"),
"long_description": _("Set up your assignment types and grading policy even if you haven't created all your assignments."),
"is_checked": False,
"action_url": "SettingsGrading",
"action_text": _("Edit Grading Settings"),
"action_external": False},
{"short_description": _("Explore the Other Studio Checklists"),
"action_external": False,
},
{
"short_description": _("Explore the Other Studio Checklists"),
"long_description": _("Discover other available course authoring tools, and find help when you need it."),
"is_checked": False,
"action_url": "",
"action_text": "",
"action_external": False}]},
{"short_description": _("Draft a Rough Course Outline"),
"items": [{"short_description": _("Create Your First Section and Subsection"),
"action_external": False,
},
],
},
{
"short_description": _("Draft a Rough Course Outline"),
"items": [
{
"short_description": _("Create Your First Section and Subsection"),
"long_description": _("Use your course outline to build your first Section and Subsection."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Set Section Release Dates"),
"action_external": False,
},
{
"short_description": _("Set Section Release Dates"),
"long_description": _("Specify the release dates for each Section in your course. Sections become visible to students on their release dates."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Designate a Subsection as Graded"),
"action_external": False,
},
{
"short_description": _("Designate a Subsection as Graded"),
"long_description": _("Set a Subsection to be graded as a specific assignment type. Assignments within graded Subsections count toward a student's final grade."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Reordering Course Content"),
"action_external": False,
},
{
"short_description": _("Reordering Course Content"),
"long_description": _("Use drag and drop to reorder the content in your course."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Renaming Sections"),
"action_external": False,
},
{
"short_description": _("Renaming Sections"),
"long_description": _("Rename Sections by clicking the Section name from the Course Outline."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Deleting Course Content"),
"action_external": False,
},
{
"short_description": _("Deleting Course Content"),
"long_description": _("Delete Sections, Subsections, or Units you don't need anymore. Be careful, as there is no Undo function."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Add an Instructor-Only Section to Your Outline"),
"action_external": False,
},
{
"short_description": _("Add an Instructor-Only Section to Your Outline"),
"long_description": _("Some course authors find using a section for unsorted, in-progress work useful. To do this, create a section and set the release date to the distant future."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False}]},
{"short_description": _("Explore edX's Support Tools"),
"items": [{"short_description": _("Explore the Studio Help Forum"),
"action_external": False,
},
],
},
{
"short_description": _("Explore edX's Support Tools"),
"items": [
{
"short_description": _("Explore the Studio Help Forum"),
"long_description": _("Access the Studio Help forum from the menu that appears when you click your user name in the top right corner of Studio."),
"is_checked": False,
"action_url": "http://help.edge.edx.org/",
"action_text": _("Visit Studio Help"),
"action_external": True},
{"short_description": _("Enroll in edX 101"),
"action_external": True,
},
{
"short_description": _("Enroll in edX 101"),
"long_description": _("Register for edX 101, edX's primer for course creation."),
"is_checked": False,
"action_url": "https://edge.edx.org/courses/edX/edX101/How_to_Create_an_edX_Course/about",
"action_text": _("Register for edX 101"),
"action_external": True},
{"short_description": _("Download the Studio Documentation"),
"action_external": True,
},
{
"short_description": _("Download the Studio Documentation"),
"long_description": _("Download the searchable Studio reference documentation in PDF form."),
"is_checked": False,
"action_url": "http://files.edx.org/Getting_Started_with_Studio.pdf",
"action_text": _("Download Documentation"),
"action_external": True}]},
{"short_description": _("Draft Your Course About Page"),
"items": [{"short_description": _("Draft a Course Description"),
"action_external": True,
},
],
},
{
"short_description": _("Draft Your Course About Page"),
"items": [
{
"short_description": _("Draft a Course Description"),
"long_description": _("Courses on edX have an About page that includes a course video, description, and more. Draft the text students will read before deciding to enroll in your course."),
"is_checked": False,
"action_url": "SettingsDetails",
"action_text": _("Edit Course Schedule &amp; Details"),
"action_external": False},
{"short_description": _("Add Staff Bios"),
"action_external": False,
},
{
"short_description": _("Add Staff Bios"),
"long_description": _("Showing prospective students who their instructor will be is helpful. Include staff bios on the course About page."),
"is_checked": False,
"action_url": "SettingsDetails",
"action_text": _("Edit Course Schedule &amp; Details"),
"action_external": False},
{"short_description": _("Add Course FAQs"),
"action_external": False,
},
{
"short_description": _("Add Course FAQs"),
"long_description": _("Include a short list of frequently asked questions about your course."),
"is_checked": False,
"action_url": "SettingsDetails",
"action_text": _("Edit Course Schedule &amp; Details"),
"action_external": False},
{"short_description": _("Add Course Prerequisites"),
"action_external": False,
},
{
"short_description": _("Add Course Prerequisites"),
"long_description": _("Let students know what knowledge and/or skills they should have before they enroll in your course."),
"is_checked": False,
"action_url": "SettingsDetails",
"action_text": _("Edit Course Schedule &amp; Details"),
"action_external": False}]}
])
"action_external": False,
},
],
},
],
)
info_sidebar_name = String(
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."),
......
......@@ -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}, ]
......
......@@ -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("""\
<annotatable>
......
......@@ -23,9 +23,12 @@ class MakoModuleDescriptor(XModuleDescriptor):
def __init__(self, *args, **kwargs):
super(MakoModuleDescriptor, self).__init__(*args, **kwargs)
if getattr(self.runtime, 'render_template', None) is None:
raise TypeError('{runtime} must have a render_template function'
raise TypeError(
'{runtime} must have a render_template function'
' in order to use a MakoDescriptor'.format(
runtime=self.runtime))
runtime=self.runtime,
)
)
def get_context(self):
"""
......
......@@ -152,16 +152,21 @@ class MongoConnection(object):
original_version (str or ObjectID): The id of a structure
block_key (BlockKey): The id of the block in question
"""
return [structure_from_mongo(structure) for structure in self.structures.find({
return [
structure_from_mongo(structure)
for structure in self.structures.find({
'original_version': original_version,
'blocks': {
'$elemMatch': {
'block_id': block_key.id,
'block_type': block_key.type,
'edit_info.update_version': {'$exists': True},
}
}
})]
'edit_info.update_version': {
'$exists': True,
},
},
},
})
]
def insert_structure(self, structure):
"""
......
......@@ -75,9 +75,16 @@ def get_dummy_course(start, announcement=None, is_new=None, advertised_start=Non
<html url_name="h" display_name="H">Two houses, ...</html>
</chapter>
</course>
'''.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)
......
......@@ -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("""\
<annotatable>
......
......@@ -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("""\
<annotatable>
......
......@@ -176,8 +176,13 @@ htmlhelp_basename = 'MathJaxdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'MathJax.tex', u'MathJax Documentation',
u'Davide Cervone, Casey Stark, Robert Miner, Paul Topping', 'manual'),
(
'index',
'MathJax.tex',
u'MathJax Documentation',
u'Davide Cervone, Casey Stark, Robert Miner, Paul Topping',
'manual',
),
]
# The name of an image file (relative to this directory) to place at the top of
......
......@@ -147,7 +147,8 @@ class CourseNavPage(PageObject):
# It *would* make sense to always get the HTML, but unfortunately
# the open tab has some child <span> tags that we don't want.
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()
).results
......
......@@ -33,8 +33,14 @@ class ORAComponentTest(StudioCourseTest):
XBlockFixtureDesc('chapter', 'Test Section').add_children(
XBlockFixtureDesc('sequential', 'Test Subsection').add_children(
XBlockFixtureDesc('vertical', 'Test Unit').add_children(
XBlockFixtureDesc('combinedopenended', "Peer Problem",
data=load_data_str('ora_peer_problem.xml'), metadata={'graded': True}),
XBlockFixtureDesc(
'combinedopenended',
"Peer Problem",
data=load_data_str('ora_peer_problem.xml'),
metadata={
'graded': True,
},
),
XBlockFixtureDesc('peergrading', 'Peer Module'),
)
)
......
......@@ -68,19 +68,39 @@ 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', '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-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',
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'),
))).install()
)
)
).install()
# 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.
......
......@@ -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
......@@ -134,7 +140,7 @@ MOCK_MODULES = [
'yaml',
'webob',
'webob.multidict',
]
]
if on_rtd:
for mod_name in MOCK_MODULES:
......
......@@ -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
......@@ -126,7 +132,7 @@ MOCK_MODULES = [
'yaml',
'webob',
'webob.multidict',
]
]
if on_rtd:
for mod_name in MOCK_MODULES:
......
......@@ -196,21 +196,26 @@ htmlhelp_basename = 'edxdoc'
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'getting_started.tex', u'edX Studio Documentation',
u'EdX Doc Team', 'manual'),
(
'index',
'getting_started.tex',
u'edX Studio Documentation',
u'EdX Doc Team',
'manual',
),
]
# The name of an image file (relative to this directory) to place at the top of
......@@ -253,9 +258,15 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'getting_started', u'getting_started Documentation',
u'EdX Doc Team', 'getting_started', 'One line description of project.',
'Miscellaneous'),
(
'index',
'getting_started',
u'getting_started Documentation',
u'EdX Doc Team',
'getting_started',
'One line description of project.',
'Miscellaneous',
),
]
# Documents to append as an appendix to all manuals.
......
......@@ -260,8 +260,10 @@ def _grade(student, request, course, keep_raw_scores):
if graded_total.possible > 0:
format_scores.append(graded_total)
else:
log.info("Unable to grade a section with a total possible score of zero. " +
str(section_descriptor.location))
log.info(
"Unable to grade a section with a total possible score of zero. " +
str(section_descriptor.location)
)
totaled_scores[section_format] = format_scores
......
......@@ -54,7 +54,8 @@ class StudentModule(models.Model):
## Grade, and are we done?
grade = models.FloatField(null=True, blank=True, db_index=True)
max_grade = models.FloatField(null=True, blank=True)
DONE_TYPES = (('na', 'NOT_APPLICABLE'),
DONE_TYPES = (
('na', 'NOT_APPLICABLE'),
('f', 'FINISHED'),
('i', 'INCOMPLETE'),
)
......
class completion(object):
def __init__(self, **d):
self.dict = dict({'duration_total': 0,
'duration_watched': 0,
'done': True,
'questions_correct': 0,
'questions_incorrect': 0,
'questions_total': 0})
if d:
self.dict.update(d)
def __getitem__(self, key):
return self.dict[key]
def __setitem__(self, key, value):
self.dict[key] = value
def __add__(self, other):
result = dict(self.dict)
for item in ['duration_total',
'duration_watched',
'done',
'questions_correct',
'questions_incorrect',
'questions_total']:
result[item] = result[item] + other.dict[item]
return completion(**result)
def __contains__(self, key):
return key in dict
def __repr__(self):
return repr(self.dict)
if __name__ == '__main__':
dict1 = completion(duration_total=5)
dict2 = completion(duration_total=7)
print dict1 + dict2
......@@ -27,6 +27,8 @@ class LoginEnrollmentTestCase(TestCase):
Provides support for user creation,
activation, login, and course enrollment.
"""
user = None
def setup_user(self):
"""
Create a user account, activate, and log in.
......@@ -34,8 +36,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)
......
......@@ -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')
......
from django.test import TestCase
from courseware import progress
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.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.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.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}
def test_getitem(self):
self.assertEqual(self.c.__getitem__('duration_watched'), 0)
def test_setitem(self):
self.c.__setitem__('questions_correct', 4)
self.assertEqual(str(self.c), str(self.d))
def test_repr(self):
self.assertEqual(self.c.__repr__(), str(progress.completion()))
......@@ -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]
......
......@@ -28,8 +28,11 @@ class MyCompleter(object): # Custom completer
def complete(self, text, state):
if state == 0: # on first trigger, build possible matches
if text: # cache matches (entries that start with entered text)
self.matches = [s for s in self.options
if s and s.startswith(text)]
self.matches = [
option
for option in self.options
if option and option.startswith(text)
]
else: # no text entered, all matches possible
self.matches = self.options[:]
......@@ -115,7 +118,8 @@ class Command(BaseCommand):
if make_eamap:
credentials = "/C=US/ST=Massachusetts/O=Massachusetts Institute of Technology/OU=Client CA v1/CN=%s/emailAddress=%s" % (name, email)
eamap = ExternalAuthMap(external_id=email,
eamap = ExternalAuthMap(
external_id=email,
external_email=email,
external_domain=mit_domain,
external_name=name,
......
......@@ -158,8 +158,12 @@ def combined_notifications(course, user):
try:
#Get the notifications from the grading controller
notifications = controller_qs.check_combined_notifications(course.id, student_id, user_is_staff,
last_time_viewed)
notifications = controller_qs.check_combined_notifications(
course.id,
student_id,
user_is_staff,
last_time_viewed,
)
if notifications.get('success'):
if (notifications.get('staff_needs_to_grade') or
notifications.get('student_needs_to_peer_grade')):
......@@ -194,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
......
......@@ -57,15 +57,25 @@ class MockStaffGradingService(object):
def get_problem_list(self, course_id, grader_id):
self.cnt += 1
return {'success': True,
return {
'success': True,
'problem_list': [
json.dumps({'location': 'i4x://MITx/3.091x/problem/open_ended_demo1',
'problem_name': "Problem 1", 'num_graded': 3, 'num_pending': 5,
'min_for_ml': 10}),
json.dumps({'location': 'i4x://MITx/3.091x/problem/open_ended_demo2',
'problem_name': "Problem 2", 'num_graded': 1, 'num_pending': 5,
'min_for_ml': 10})
]}
json.dumps({
'location': 'i4x://MITx/3.091x/problem/open_ended_demo1',
'problem_name': "Problem 1",
'num_graded': 3,
'num_pending': 5,
'min_for_ml': 10,
}),
json.dumps({
'location': 'i4x://MITx/3.091x/problem/open_ended_demo2',
'problem_name': "Problem 2",
'num_graded': 1,
'num_pending': 5,
'min_for_ml': 10,
}),
],
}
def save_grade(self, course_id, grader_id, submission_id, score, feedback, skipped, rubric_scores,
submission_flagged):
......
......@@ -14,14 +14,18 @@ class TestPaverBokChoy(unittest.TestCase):
def _expected_command(self, expected_text_append):
if expected_text_append:
expected_text_append = "/" + expected_text_append
expected_statement = ("DEFAULT_STORE=None SCREENSHOT_DIR='{repo_dir}/test_root/log' "
expected_statement = (
"DEFAULT_STORE=None SCREENSHOT_DIR='{repo_dir}/test_root/log' "
"BOK_CHOY_HAR_DIR='{repo_dir}/test_root/log/hars' "
"SELENIUM_DRIVER_LOG_DIR='{repo_dir}/test_root/log' "
"nosetests {repo_dir}/common/test/acceptance/tests{exp_text} "
"--with-xunit "
"--xunit-file={repo_dir}/reports/bok_choy/xunit.xml "
"--verbosity=2 ".format(repo_dir=REPO_DIR,
exp_text=expected_text_append))
"--verbosity=2 ".format(
repo_dir=REPO_DIR,
exp_text=expected_text_append,
)
)
return expected_statement
def test_default_bokchoy(self):
......
......@@ -56,8 +56,8 @@ set -e
###############################################################################
# Violations thresholds for failing the build
PYLINT_THRESHOLD=4725
PEP8_THRESHOLD=150
PYLINT_THRESHOLD=4600
PEP8_THRESHOLD=15
source $HOME/jenkins_env
......
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