From f1cd35ac0b7c0c3b3a7ad17fc6e31fbf0057dc14 Mon Sep 17 00:00:00 2001 From: stv Date: Tue, 25 Nov 2014 13:05:17 -0500 Subject: [PATCH 1/4] Fix PEP8: E301 expected 1 blank line, found 0 --- common/test/acceptance/pages/lms/instructor_dashboard.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/test/acceptance/pages/lms/instructor_dashboard.py b/common/test/acceptance/pages/lms/instructor_dashboard.py index 6f703495d5..f6dd4b45f1 100644 --- a/common/test/acceptance/pages/lms/instructor_dashboard.py +++ b/common/test/acceptance/pages/lms/instructor_dashboard.py @@ -13,6 +13,7 @@ class InstructorDashboardPage(CoursePage): Instructor dashboard, where course staff can manage a course. """ url_path = "instructor" + def is_browser_on_page(self): return self.q(css='div.instructor-dashboard-wrapper-2').present @@ -31,6 +32,7 @@ class MembershipPage(PageObject): Membership section of the Instructor dashboard. """ url = None + def is_browser_on_page(self): return self.q(css='a[data-section=membership].active-section').present From b2ff02f0e17d4c90d37777066d0605603cb2f23c Mon Sep 17 00:00:00 2001 From: stv Date: Tue, 25 Nov 2014 13:05:43 -0500 Subject: [PATCH 2/4] Fix PEP8: E302 expected 2 blank lines, found 1 --- common/djangoapps/third_party_auth/pipeline.py | 1 + common/djangoapps/user_api/api/profile.py | 1 + 2 files changed, 2 insertions(+) diff --git a/common/djangoapps/third_party_auth/pipeline.py b/common/djangoapps/third_party_auth/pipeline.py index 6fb7951fb5..d1fd527fef 100644 --- a/common/djangoapps/third_party_auth/pipeline.py +++ b/common/djangoapps/third_party_auth/pipeline.py @@ -452,6 +452,7 @@ def parse_query_params(strategy, response, *args, **kwargs): 'is_register_2': auth_entry == AUTH_ENTRY_REGISTER_2, } + # TODO (ECOM-369): Once the A/B test of the combined login/registration # form completes, we will be able to remove the extra login/registration # end-points. HOWEVER, users who used the new forms during the A/B diff --git a/common/djangoapps/user_api/api/profile.py b/common/djangoapps/user_api/api/profile.py index 4b5ae6a945..0970db267e 100644 --- a/common/djangoapps/user_api/api/profile.py +++ b/common/djangoapps/user_api/api/profile.py @@ -16,6 +16,7 @@ from user_api.helpers import intercept_errors log = logging.getLogger(__name__) + class ProfileRequestError(Exception): """ The request to the API was not valid. """ pass From a86777eb4e79c0ed2d6214bbd2dabf91487d8277 Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 26 Nov 2014 15:09:48 -0500 Subject: [PATCH 3/4] Fix PEP8: E303 too many blank lines --- common/djangoapps/user_api/tests/test_profile_api.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/djangoapps/user_api/tests/test_profile_api.py b/common/djangoapps/user_api/tests/test_profile_api.py index 65f62cc061..532831834d 100644 --- a/common/djangoapps/user_api/tests/test_profile_api.py +++ b/common/djangoapps/user_api/tests/test_profile_api.py @@ -174,8 +174,6 @@ class ProfileApiTest(TestCase): result_obj = UserOrgTag.objects.get(user=user, org=course.id.org, key='email-optin') self.assertEqual(result_obj.value, expected_result) - - @raises(profile_api.ProfileUserNotFound) def test_retrieve_and_update_preference_info_no_user(self): preferences = profile_api.preference_info(self.USERNAME) From edb6c161d6f6bf6b1ce395c05d8c7b11b2f3958b Mon Sep 17 00:00:00 2001 From: stv Date: Tue, 25 Nov 2014 13:06:25 -0500 Subject: [PATCH 4/4] Lower PEP8 threshold to 0 violations --- scripts/all-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/all-tests.sh b/scripts/all-tests.sh index ba83d90950..d0b2d38eff 100755 --- a/scripts/all-tests.sh +++ b/scripts/all-tests.sh @@ -57,7 +57,7 @@ set -e # Violations thresholds for failing the build PYLINT_THRESHOLD=4600 -PEP8_THRESHOLD=5 +PEP8_THRESHOLD=0 source $HOME/jenkins_env