From 0dad9da5e4d4d74046a3e273648f24cb58c4c506 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sat, 29 Nov 2014 22:50:05 -0500 Subject: [PATCH 01/39] s/pylint: disable=W0621/pylint: disable=redefined-outer-name/ --- .../contentstore/features/advanced_settings.py | 2 +- .../contentstore/features/checklists.py | 2 +- cms/djangoapps/contentstore/features/common.py | 2 +- .../contentstore/features/component.py | 2 +- .../contentstore/features/course-export.py | 2 +- .../contentstore/features/course-outline.py | 2 +- .../contentstore/features/course-settings.py | 2 +- .../contentstore/features/course-team.py | 2 +- .../contentstore/features/course-updates.py | 2 +- .../contentstore/features/course_import.py | 2 +- cms/djangoapps/contentstore/features/courses.py | 2 +- cms/djangoapps/contentstore/features/grading.py | 2 +- cms/djangoapps/contentstore/features/help.py | 2 +- cms/djangoapps/contentstore/features/pages.py | 2 +- cms/djangoapps/contentstore/features/signup.py | 2 +- .../contentstore/features/textbooks.py | 2 +- cms/djangoapps/contentstore/features/upload.py | 2 +- .../course_creators/migrations/0001_initial.py | 2 +- .../migrations/0001_initial.py | 2 +- .../course_modes/migrations/0001_initial.py | 2 +- .../0002_auto__add_field_coursemode_currency.py | 2 +- ...ue_coursemode_course_id_currency_mode_slug.py | 2 +- ...auto__add_field_coursemode_expiration_date.py | 2 +- ...__add_field_coursemode_expiration_datetime.py | 2 +- .../migrations/0007_add_description.py | 2 +- ...desarchive__chg_field_coursemode_course_id.py | 2 +- .../dark_lang/migrations/0001_initial.py | 2 +- .../embargo/migrations/0001_initial.py | 2 +- .../external_auth/migrations/0001_initial.py | 2 +- .../reverification/migrations/0001_initial.py | 2 +- ..._field_courseenrollmentallowed_auto_enroll.py | 2 +- ...ive_flag_and_mode_to_courseware_enrollment.py | 2 +- .../migrations/0028_auto__add_userstanding.py | 2 +- ...able_between_user_and_anonymous_student_id.py | 2 +- .../student/migrations/0029_remove_pearson.py | 2 +- ...Profile_country_add_field_UserProfile_city.py | 2 +- .../migrations/0033_auto__add_passwordhistory.py | 2 +- .../0034_auto__add_courseaccessrole.py | 2 +- .../0037_auto__add_courseregistrationcode.py | 2 +- .../0038_auto__add_usersignupsource.py | 2 +- .../0039_auto__del_courseregistrationcode.py | 2 +- ...urce_user_id__add_field_usersignupsource_u.py | 2 +- common/djangoapps/terrain/course_helpers.py | 2 +- common/djangoapps/terrain/steps.py | 2 +- common/djangoapps/terrain/ui_helpers.py | 2 +- .../user_api/migrations/0001_initial.py | 2 +- ...d_unique_usercoursetags_user_course_id_key.py | 2 +- .../migrations/0003_rename_usercoursetags.py | 2 +- .../migrations/0008_add_course_authorizations.py | 2 +- .../migrations/0009_force_unique_course_ids.py | 2 +- .../0015_adding_mode_for_verified_certs.py | 2 +- .../courseware/features/certificates.py | 2 +- lms/djangoapps/courseware/features/common.py | 2 +- .../courseware/features/conditional.py | 2 +- lms/djangoapps/courseware/features/courseware.py | 2 +- .../courseware/features/courseware_common.py | 2 +- lms/djangoapps/courseware/features/homepage.py | 2 +- lms/djangoapps/courseware/features/login.py | 2 +- lms/djangoapps/courseware/features/navigation.py | 2 +- lms/djangoapps/courseware/features/openended.py | 2 +- lms/djangoapps/courseware/features/problems.py | 2 +- .../courseware/features/problems_setup.py | 2 +- .../courseware/features/registration.py | 2 +- lms/djangoapps/courseware/features/signup.py | 2 +- .../0006_create_student_module_history.py | 2 +- .../0007_allow_null_version_in_history.py | 2 +- .../migrations/0008_add_xmodule_storage.py | 2 +- .../migrations/0009_add_field_default.py | 2 +- ...xblock_field_content_to_user_state_summary.py | 2 +- lms/djangoapps/foldit/migrations/0001_initial.py | 2 +- lms/djangoapps/instructor/features/bulk_email.py | 2 +- lms/djangoapps/instructor/features/common.py | 2 +- .../instructor/features/data_download.py | 2 +- lms/djangoapps/instructor/views/api.py | 10 +++++----- .../instructor_task/migrations/0001_initial.py | 2 +- .../migrations/0002_add_subtask_field.py | 2 +- .../linkedin/migrations/0001_initial.py | 2 +- lms/djangoapps/notes/migrations/0001_initial.py | 2 +- ...4_auto__add_field_orderitem_fulfilled_time.py | 2 +- ...tionannotation__add_field_orderitem_report.py | 2 +- ...ed_time__add_field_orderitem_refund_reques.py | 2 +- ...0007_auto__add_field_orderitem_service_fee.py | 2 +- ...nredemption__chg_field_certificateitem_cou.py | 2 +- ...eregistrationcode__add_coupon__chg_field_c.py | 2 +- ...demption__del_field_courseregistrationcode.py | 2 +- ...__add_field_courseregistrationcode_invoice.py | 2 +- ...rationcode_transaction_group_name__del_fie.py | 2 +- .../0013_auto__add_field_invoice_is_valid.py | 2 +- ...id__add_field_invoice_address_line_1__add_.py | 2 +- ...hase_order_number__del_field_invoice_compa.py | 2 +- ...any_email__del_field_invoice_company_refer.py | 2 +- ...rationcode_order__chg_field_registrationco.py | 2 +- lms/djangoapps/shoppingcart/tests/test_views.py | 16 ++++++++-------- .../verify_student/migrations/0001_initial.py | 2 +- ...eld_softwaresecurephotoverification_window.py | 2 +- ...ld_softwaresecurephotoverification_display.py | 2 +- 96 files changed, 107 insertions(+), 107 deletions(-) diff --git a/cms/djangoapps/contentstore/features/advanced_settings.py b/cms/djangoapps/contentstore/features/advanced_settings.py index 76c4a3f2e0..87b00610b5 100644 --- a/cms/djangoapps/contentstore/features/advanced_settings.py +++ b/cms/djangoapps/contentstore/features/advanced_settings.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/features/checklists.py b/cms/djangoapps/contentstore/features/checklists.py index 6053f7085f..92c39cc0cd 100644 --- a/cms/djangoapps/contentstore/features/checklists.py +++ b/cms/djangoapps/contentstore/features/checklists.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from nose.tools import assert_true, assert_equal # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index 6a83fd35eb..023a03f1f3 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name import os from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index bc37e8fd41..93df2be2ec 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name # Lettuce formats proposed definitions for unimplemented steps with the # argument name "step" instead of "_step" and pylint does not like that. diff --git a/cms/djangoapps/contentstore/features/course-export.py b/cms/djangoapps/contentstore/features/course-export.py index d8ab58a6d5..0077c17bfa 100644 --- a/cms/djangoapps/contentstore/features/course-export.py +++ b/cms/djangoapps/contentstore/features/course-export.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name # pylint: disable=W0613 from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/course-outline.py b/cms/djangoapps/contentstore/features/course-outline.py index a5f4da0731..94e41b33e5 100644 --- a/cms/djangoapps/contentstore/features/course-outline.py +++ b/cms/djangoapps/contentstore/features/course-outline.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from common import * diff --git a/cms/djangoapps/contentstore/features/course-settings.py b/cms/djangoapps/contentstore/features/course-settings.py index 4896ffddb1..44c2b69c45 100644 --- a/cms/djangoapps/contentstore/features/course-settings.py +++ b/cms/djangoapps/contentstore/features/course-settings.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from terrain.steps import reload_the_page diff --git a/cms/djangoapps/contentstore/features/course-team.py b/cms/djangoapps/contentstore/features/course-team.py index d080de275a..2c7abd40b0 100644 --- a/cms/djangoapps/contentstore/features/course-team.py +++ b/cms/djangoapps/contentstore/features/course-team.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from nose.tools import assert_in # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/features/course-updates.py b/cms/djangoapps/contentstore/features/course-updates.py index ca4d884590..064b4eb5a5 100644 --- a/cms/djangoapps/contentstore/features/course-updates.py +++ b/cms/djangoapps/contentstore/features/course-updates.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from selenium.webdriver.common.keys import Keys diff --git a/cms/djangoapps/contentstore/features/course_import.py b/cms/djangoapps/contentstore/features/course_import.py index 42131f097e..f3090a12ee 100644 --- a/cms/djangoapps/contentstore/features/course_import.py +++ b/cms/djangoapps/contentstore/features/course_import.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name # pylint: disable=W0613 import os diff --git a/cms/djangoapps/contentstore/features/courses.py b/cms/djangoapps/contentstore/features/courses.py index 8f8bc2a1e8..2f2f47b30c 100644 --- a/cms/djangoapps/contentstore/features/courses.py +++ b/cms/djangoapps/contentstore/features/courses.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from common import * diff --git a/cms/djangoapps/contentstore/features/grading.py b/cms/djangoapps/contentstore/features/grading.py index 3c2d9c4495..b953b66e24 100644 --- a/cms/djangoapps/contentstore/features/grading.py +++ b/cms/djangoapps/contentstore/features/grading.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from common import * diff --git a/cms/djangoapps/contentstore/features/help.py b/cms/djangoapps/contentstore/features/help.py index 639aad9c01..ffa2cbd3d0 100644 --- a/cms/djangoapps/contentstore/features/help.py +++ b/cms/djangoapps/contentstore/features/help.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name # pylint: disable=W0613 from nose.tools import assert_false # pylint: disable=no-name-in-module diff --git a/cms/djangoapps/contentstore/features/pages.py b/cms/djangoapps/contentstore/features/pages.py index bd2defc69b..983c005192 100644 --- a/cms/djangoapps/contentstore/features/pages.py +++ b/cms/djangoapps/contentstore/features/pages.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name # pylint: disable=W0613 from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/signup.py b/cms/djangoapps/contentstore/features/signup.py index 1aa8d4b298..5e4fc6c3d6 100644 --- a/cms/djangoapps/contentstore/features/signup.py +++ b/cms/djangoapps/contentstore/features/signup.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/textbooks.py b/cms/djangoapps/contentstore/features/textbooks.py index 1dfcea3b57..4be767d776 100644 --- a/cms/djangoapps/contentstore/features/textbooks.py +++ b/cms/djangoapps/contentstore/features/textbooks.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from django.conf import settings diff --git a/cms/djangoapps/contentstore/features/upload.py b/cms/djangoapps/contentstore/features/upload.py index e99296da49..84ec55c956 100644 --- a/cms/djangoapps/contentstore/features/upload.py +++ b/cms/djangoapps/contentstore/features/upload.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from lettuce.django import django_url diff --git a/cms/djangoapps/course_creators/migrations/0001_initial.py b/cms/djangoapps/course_creators/migrations/0001_initial.py index ec7fd9ad9d..a1d2c8d08a 100644 --- a/cms/djangoapps/course_creators/migrations/0001_initial.py +++ b/cms/djangoapps/course_creators/migrations/0001_initial.py @@ -71,4 +71,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['course_creators'] \ No newline at end of file + complete_apps = ['course_creators'] diff --git a/common/djangoapps/course_action_state/migrations/0001_initial.py b/common/djangoapps/course_action_state/migrations/0001_initial.py index f222bcb25a..a8ab6c7db3 100644 --- a/common/djangoapps/course_action_state/migrations/0001_initial.py +++ b/common/djangoapps/course_action_state/migrations/0001_initial.py @@ -89,4 +89,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['course_action_state'] \ No newline at end of file + complete_apps = ['course_action_state'] diff --git a/common/djangoapps/course_modes/migrations/0001_initial.py b/common/djangoapps/course_modes/migrations/0001_initial.py index 83e53769a2..1818b8abea 100644 --- a/common/djangoapps/course_modes/migrations/0001_initial.py +++ b/common/djangoapps/course_modes/migrations/0001_initial.py @@ -37,4 +37,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['course_modes'] \ No newline at end of file + complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0002_auto__add_field_coursemode_currency.py b/common/djangoapps/course_modes/migrations/0002_auto__add_field_coursemode_currency.py index 7a25ef2256..78bb5bf4fa 100644 --- a/common/djangoapps/course_modes/migrations/0002_auto__add_field_coursemode_currency.py +++ b/common/djangoapps/course_modes/migrations/0002_auto__add_field_coursemode_currency.py @@ -32,4 +32,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['course_modes'] \ No newline at end of file + complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0003_auto__add_unique_coursemode_course_id_currency_mode_slug.py b/common/djangoapps/course_modes/migrations/0003_auto__add_unique_coursemode_course_id_currency_mode_slug.py index 56a4f28c57..7e6bc1bd40 100644 --- a/common/djangoapps/course_modes/migrations/0003_auto__add_unique_coursemode_course_id_currency_mode_slug.py +++ b/common/djangoapps/course_modes/migrations/0003_auto__add_unique_coursemode_course_id_currency_mode_slug.py @@ -30,4 +30,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['course_modes'] \ No newline at end of file + complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0004_auto__add_field_coursemode_expiration_date.py b/common/djangoapps/course_modes/migrations/0004_auto__add_field_coursemode_expiration_date.py index afd8207388..19851446c4 100644 --- a/common/djangoapps/course_modes/migrations/0004_auto__add_field_coursemode_expiration_date.py +++ b/common/djangoapps/course_modes/migrations/0004_auto__add_field_coursemode_expiration_date.py @@ -33,4 +33,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['course_modes'] \ No newline at end of file + complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0005_auto__add_field_coursemode_expiration_datetime.py b/common/djangoapps/course_modes/migrations/0005_auto__add_field_coursemode_expiration_datetime.py index b293efa23f..101c3b919b 100644 --- a/common/djangoapps/course_modes/migrations/0005_auto__add_field_coursemode_expiration_datetime.py +++ b/common/djangoapps/course_modes/migrations/0005_auto__add_field_coursemode_expiration_datetime.py @@ -34,4 +34,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['course_modes'] \ No newline at end of file + complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0007_add_description.py b/common/djangoapps/course_modes/migrations/0007_add_description.py index 2828d2ad9f..98386e4bcf 100644 --- a/common/djangoapps/course_modes/migrations/0007_add_description.py +++ b/common/djangoapps/course_modes/migrations/0007_add_description.py @@ -41,4 +41,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['course_modes'] \ No newline at end of file + complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0007_auto__add_coursemodesarchive__chg_field_coursemode_course_id.py b/common/djangoapps/course_modes/migrations/0007_auto__add_coursemodesarchive__chg_field_coursemode_course_id.py index c76b8745cb..d73b6b5e48 100644 --- a/common/djangoapps/course_modes/migrations/0007_auto__add_coursemodesarchive__chg_field_coursemode_course_id.py +++ b/common/djangoapps/course_modes/migrations/0007_auto__add_coursemodesarchive__chg_field_coursemode_course_id.py @@ -61,4 +61,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['course_modes'] \ No newline at end of file + complete_apps = ['course_modes'] diff --git a/common/djangoapps/dark_lang/migrations/0001_initial.py b/common/djangoapps/dark_lang/migrations/0001_initial.py index cc715fe8e5..b2f856ac43 100644 --- a/common/djangoapps/dark_lang/migrations/0001_initial.py +++ b/common/djangoapps/dark_lang/migrations/0001_initial.py @@ -71,4 +71,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['dark_lang'] \ No newline at end of file + complete_apps = ['dark_lang'] diff --git a/common/djangoapps/embargo/migrations/0001_initial.py b/common/djangoapps/embargo/migrations/0001_initial.py index 9516b8985e..ce3a6198a0 100644 --- a/common/djangoapps/embargo/migrations/0001_initial.py +++ b/common/djangoapps/embargo/migrations/0001_initial.py @@ -111,4 +111,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['embargo'] \ No newline at end of file + complete_apps = ['embargo'] diff --git a/common/djangoapps/external_auth/migrations/0001_initial.py b/common/djangoapps/external_auth/migrations/0001_initial.py index a5ebf023df..cf93c99d6b 100644 --- a/common/djangoapps/external_auth/migrations/0001_initial.py +++ b/common/djangoapps/external_auth/migrations/0001_initial.py @@ -87,4 +87,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['external_auth'] \ No newline at end of file + complete_apps = ['external_auth'] diff --git a/common/djangoapps/reverification/migrations/0001_initial.py b/common/djangoapps/reverification/migrations/0001_initial.py index 89ad801879..b68f411893 100644 --- a/common/djangoapps/reverification/migrations/0001_initial.py +++ b/common/djangoapps/reverification/migrations/0001_initial.py @@ -33,4 +33,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['reverification'] \ No newline at end of file + complete_apps = ['reverification'] diff --git a/common/djangoapps/student/migrations/0025_auto__add_field_courseenrollmentallowed_auto_enroll.py b/common/djangoapps/student/migrations/0025_auto__add_field_courseenrollmentallowed_auto_enroll.py index 1cb21e9b33..a60d121de8 100644 --- a/common/djangoapps/student/migrations/0025_auto__add_field_courseenrollmentallowed_auto_enroll.py +++ b/common/djangoapps/student/migrations/0025_auto__add_field_courseenrollmentallowed_auto_enroll.py @@ -170,4 +170,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0027_add_active_flag_and_mode_to_courseware_enrollment.py b/common/djangoapps/student/migrations/0027_add_active_flag_and_mode_to_courseware_enrollment.py index bba8cc6e34..112dccfe51 100644 --- a/common/djangoapps/student/migrations/0027_add_active_flag_and_mode_to_courseware_enrollment.py +++ b/common/djangoapps/student/migrations/0027_add_active_flag_and_mode_to_courseware_enrollment.py @@ -180,4 +180,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0028_auto__add_userstanding.py b/common/djangoapps/student/migrations/0028_auto__add_userstanding.py index d26699448a..ae66b86963 100644 --- a/common/djangoapps/student/migrations/0028_auto__add_userstanding.py +++ b/common/djangoapps/student/migrations/0028_auto__add_userstanding.py @@ -185,4 +185,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py b/common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py index e086496bfc..4975598157 100644 --- a/common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py +++ b/common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py @@ -191,4 +191,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0029_remove_pearson.py b/common/djangoapps/student/migrations/0029_remove_pearson.py index b92b27017f..4e1cb09b4c 100644 --- a/common/djangoapps/student/migrations/0029_remove_pearson.py +++ b/common/djangoapps/student/migrations/0029_remove_pearson.py @@ -182,4 +182,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0032_add_field_UserProfile_country_add_field_UserProfile_city.py b/common/djangoapps/student/migrations/0032_add_field_UserProfile_country_add_field_UserProfile_city.py index bf35f208ed..a4d323e498 100644 --- a/common/djangoapps/student/migrations/0032_add_field_UserProfile_country_add_field_UserProfile_city.py +++ b/common/djangoapps/student/migrations/0032_add_field_UserProfile_country_add_field_UserProfile_city.py @@ -143,4 +143,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0033_auto__add_passwordhistory.py b/common/djangoapps/student/migrations/0033_auto__add_passwordhistory.py index f46fd07894..c03a45f3f2 100644 --- a/common/djangoapps/student/migrations/0033_auto__add_passwordhistory.py +++ b/common/djangoapps/student/migrations/0033_auto__add_passwordhistory.py @@ -153,4 +153,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0034_auto__add_courseaccessrole.py b/common/djangoapps/student/migrations/0034_auto__add_courseaccessrole.py index d6267ecb01..bf9ce5e9db 100644 --- a/common/djangoapps/student/migrations/0034_auto__add_courseaccessrole.py +++ b/common/djangoapps/student/migrations/0034_auto__add_courseaccessrole.py @@ -186,4 +186,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0037_auto__add_courseregistrationcode.py b/common/djangoapps/student/migrations/0037_auto__add_courseregistrationcode.py index 5853fcdd34..c60425df8a 100644 --- a/common/djangoapps/student/migrations/0037_auto__add_courseregistrationcode.py +++ b/common/djangoapps/student/migrations/0037_auto__add_courseregistrationcode.py @@ -176,4 +176,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0038_auto__add_usersignupsource.py b/common/djangoapps/student/migrations/0038_auto__add_usersignupsource.py index fd6c7a883c..faa725b794 100644 --- a/common/djangoapps/student/migrations/0038_auto__add_usersignupsource.py +++ b/common/djangoapps/student/migrations/0038_auto__add_usersignupsource.py @@ -177,4 +177,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0039_auto__del_courseregistrationcode.py b/common/djangoapps/student/migrations/0039_auto__del_courseregistrationcode.py index 4960e2cbc4..441b52ea2c 100644 --- a/common/djangoapps/student/migrations/0039_auto__del_courseregistrationcode.py +++ b/common/djangoapps/student/migrations/0039_auto__del_courseregistrationcode.py @@ -171,4 +171,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u.py b/common/djangoapps/student/migrations/0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u.py index 19afe45ad8..cabacf8de7 100644 --- a/common/djangoapps/student/migrations/0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u.py +++ b/common/djangoapps/student/migrations/0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u.py @@ -169,4 +169,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/terrain/course_helpers.py b/common/djangoapps/terrain/course_helpers.py index ab3004a810..5edabf2e37 100644 --- a/common/djangoapps/terrain/course_helpers.py +++ b/common/djangoapps/terrain/course_helpers.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name import urllib from lettuce import world diff --git a/common/djangoapps/terrain/steps.py b/common/djangoapps/terrain/steps.py index 5f51315de8..e44f36de5b 100644 --- a/common/djangoapps/terrain/steps.py +++ b/common/djangoapps/terrain/steps.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name # Disable the "wildcard import" warning so we can bring in all methods from # course helpers and ui helpers diff --git a/common/djangoapps/terrain/ui_helpers.py b/common/djangoapps/terrain/ui_helpers.py index 09028a7fc5..891e6bf6af 100644 --- a/common/djangoapps/terrain/ui_helpers.py +++ b/common/djangoapps/terrain/ui_helpers.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world diff --git a/common/djangoapps/user_api/migrations/0001_initial.py b/common/djangoapps/user_api/migrations/0001_initial.py index 754960e36d..3a5e3c0ab5 100644 --- a/common/djangoapps/user_api/migrations/0001_initial.py +++ b/common/djangoapps/user_api/migrations/0001_initial.py @@ -75,4 +75,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['user_api'] \ No newline at end of file + complete_apps = ['user_api'] diff --git a/common/djangoapps/user_api/migrations/0002_auto__add_usercoursetags__add_unique_usercoursetags_user_course_id_key.py b/common/djangoapps/user_api/migrations/0002_auto__add_usercoursetags__add_unique_usercoursetags_user_course_id_key.py index cc7e27cc4d..639fb83e9c 100644 --- a/common/djangoapps/user_api/migrations/0002_auto__add_usercoursetags__add_unique_usercoursetags_user_course_id_key.py +++ b/common/djangoapps/user_api/migrations/0002_auto__add_usercoursetags__add_unique_usercoursetags_user_course_id_key.py @@ -84,4 +84,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['user_api'] \ No newline at end of file + complete_apps = ['user_api'] diff --git a/common/djangoapps/user_api/migrations/0003_rename_usercoursetags.py b/common/djangoapps/user_api/migrations/0003_rename_usercoursetags.py index dc448817e3..9c9afc3044 100644 --- a/common/djangoapps/user_api/migrations/0003_rename_usercoursetags.py +++ b/common/djangoapps/user_api/migrations/0003_rename_usercoursetags.py @@ -69,4 +69,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['user_api'] \ No newline at end of file + complete_apps = ['user_api'] diff --git a/lms/djangoapps/bulk_email/migrations/0008_add_course_authorizations.py b/lms/djangoapps/bulk_email/migrations/0008_add_course_authorizations.py index b200ea2bde..a24e48d6e5 100644 --- a/lms/djangoapps/bulk_email/migrations/0008_add_course_authorizations.py +++ b/lms/djangoapps/bulk_email/migrations/0008_add_course_authorizations.py @@ -92,4 +92,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['bulk_email'] \ No newline at end of file + complete_apps = ['bulk_email'] diff --git a/lms/djangoapps/bulk_email/migrations/0009_force_unique_course_ids.py b/lms/djangoapps/bulk_email/migrations/0009_force_unique_course_ids.py index 23b1dbb2a3..d4a329b727 100644 --- a/lms/djangoapps/bulk_email/migrations/0009_force_unique_course_ids.py +++ b/lms/djangoapps/bulk_email/migrations/0009_force_unique_course_ids.py @@ -87,4 +87,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['bulk_email'] \ No newline at end of file + complete_apps = ['bulk_email'] diff --git a/lms/djangoapps/certificates/migrations/0015_adding_mode_for_verified_certs.py b/lms/djangoapps/certificates/migrations/0015_adding_mode_for_verified_certs.py index c16d51b8ee..4423f4e226 100644 --- a/lms/djangoapps/certificates/migrations/0015_adding_mode_for_verified_certs.py +++ b/lms/djangoapps/certificates/migrations/0015_adding_mode_for_verified_certs.py @@ -83,4 +83,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['certificates'] \ No newline at end of file + complete_apps = ['certificates'] diff --git a/lms/djangoapps/courseware/features/certificates.py b/lms/djangoapps/courseware/features/certificates.py index ed283587cf..8d54f7c258 100644 --- a/lms/djangoapps/courseware/features/certificates.py +++ b/lms/djangoapps/courseware/features/certificates.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from lettuce.django import django_url diff --git a/lms/djangoapps/courseware/features/common.py b/lms/djangoapps/courseware/features/common.py index dde91c69b5..7787244a33 100644 --- a/lms/djangoapps/courseware/features/common.py +++ b/lms/djangoapps/courseware/features/common.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from __future__ import absolute_import diff --git a/lms/djangoapps/courseware/features/conditional.py b/lms/djangoapps/courseware/features/conditional.py index de7d5fb7a5..f6b22d5ff5 100644 --- a/lms/djangoapps/courseware/features/conditional.py +++ b/lms/djangoapps/courseware/features/conditional.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, steps from nose.tools import assert_in, assert_true # pylint: disable=no-name-in-module diff --git a/lms/djangoapps/courseware/features/courseware.py b/lms/djangoapps/courseware/features/courseware.py index b169095a6e..644c063064 100644 --- a/lms/djangoapps/courseware/features/courseware.py +++ b/lms/djangoapps/courseware/features/courseware.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from lettuce.django import django_url diff --git a/lms/djangoapps/courseware/features/courseware_common.py b/lms/djangoapps/courseware/features/courseware_common.py index fdc6dd2617..6c54ef3159 100644 --- a/lms/djangoapps/courseware/features/courseware_common.py +++ b/lms/djangoapps/courseware/features/courseware_common.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name # pylint: disable=unused-argument from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/homepage.py b/lms/djangoapps/courseware/features/homepage.py index 3c17ed4f3c..0741551dc5 100644 --- a/lms/djangoapps/courseware/features/homepage.py +++ b/lms/djangoapps/courseware/features/homepage.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from nose.tools import assert_equals, assert_greater # pylint: disable=E0611 diff --git a/lms/djangoapps/courseware/features/login.py b/lms/djangoapps/courseware/features/login.py index 6d4ed75f54..42f6cb19c2 100644 --- a/lms/djangoapps/courseware/features/login.py +++ b/lms/djangoapps/courseware/features/login.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import step, world from django.contrib.auth.models import User diff --git a/lms/djangoapps/courseware/features/navigation.py b/lms/djangoapps/courseware/features/navigation.py index 5c7f18c412..e766e1d496 100644 --- a/lms/djangoapps/courseware/features/navigation.py +++ b/lms/djangoapps/courseware/features/navigation.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from common import course_location diff --git a/lms/djangoapps/courseware/features/openended.py b/lms/djangoapps/courseware/features/openended.py index 15122b7855..cf43cdacd1 100644 --- a/lms/djangoapps/courseware/features/openended.py +++ b/lms/djangoapps/courseware/features/openended.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from lettuce.django import django_url diff --git a/lms/djangoapps/courseware/features/problems.py b/lms/djangoapps/courseware/features/problems.py index 3d578044ff..4175e64cd3 100644 --- a/lms/djangoapps/courseware/features/problems.py +++ b/lms/djangoapps/courseware/features/problems.py @@ -3,7 +3,7 @@ Steps for problem.feature lettuce tests ''' # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from common import i_am_registered_for_the_course, visit_scenario_item diff --git a/lms/djangoapps/courseware/features/problems_setup.py b/lms/djangoapps/courseware/features/problems_setup.py index 15dfbb29f7..407c5068d8 100644 --- a/lms/djangoapps/courseware/features/problems_setup.py +++ b/lms/djangoapps/courseware/features/problems_setup.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name # EVERY PROBLEM TYPE MUST HAVE THE FOLLOWING: # -Section in Dictionary containing: diff --git a/lms/djangoapps/courseware/features/registration.py b/lms/djangoapps/courseware/features/registration.py index 12bbe26ee5..1b1bb94ed1 100644 --- a/lms/djangoapps/courseware/features/registration.py +++ b/lms/djangoapps/courseware/features/registration.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from lettuce.django import django_url diff --git a/lms/djangoapps/courseware/features/signup.py b/lms/djangoapps/courseware/features/signup.py index 0113662327..10009cf0d7 100644 --- a/lms/djangoapps/courseware/features/signup.py +++ b/lms/djangoapps/courseware/features/signup.py @@ -1,5 +1,5 @@ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/courseware/migrations/0006_create_student_module_history.py b/lms/djangoapps/courseware/migrations/0006_create_student_module_history.py index 8bf40cfb20..c1243510b7 100644 --- a/lms/djangoapps/courseware/migrations/0006_create_student_module_history.py +++ b/lms/djangoapps/courseware/migrations/0006_create_student_module_history.py @@ -106,4 +106,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['courseware'] \ No newline at end of file + complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0007_allow_null_version_in_history.py b/lms/djangoapps/courseware/migrations/0007_allow_null_version_in_history.py index f6204294c4..4b459c1655 100644 --- a/lms/djangoapps/courseware/migrations/0007_allow_null_version_in_history.py +++ b/lms/djangoapps/courseware/migrations/0007_allow_null_version_in_history.py @@ -97,4 +97,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['courseware'] \ No newline at end of file + complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py b/lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py index 0d89471fff..edbbc42753 100644 --- a/lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py +++ b/lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py @@ -182,4 +182,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['courseware'] \ No newline at end of file + complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0009_add_field_default.py b/lms/djangoapps/courseware/migrations/0009_add_field_default.py index cd885ee7a6..50be9f343b 100644 --- a/lms/djangoapps/courseware/migrations/0009_add_field_default.py +++ b/lms/djangoapps/courseware/migrations/0009_add_field_default.py @@ -125,4 +125,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['courseware'] \ No newline at end of file + complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0010_rename_xblock_field_content_to_user_state_summary.py b/lms/djangoapps/courseware/migrations/0010_rename_xblock_field_content_to_user_state_summary.py index 8975cb1072..d2025c36ec 100644 --- a/lms/djangoapps/courseware/migrations/0010_rename_xblock_field_content_to_user_state_summary.py +++ b/lms/djangoapps/courseware/migrations/0010_rename_xblock_field_content_to_user_state_summary.py @@ -145,4 +145,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['courseware'] \ No newline at end of file + complete_apps = ['courseware'] diff --git a/lms/djangoapps/foldit/migrations/0001_initial.py b/lms/djangoapps/foldit/migrations/0001_initial.py index 6c9edfeaa4..d288e51742 100644 --- a/lms/djangoapps/foldit/migrations/0001_initial.py +++ b/lms/djangoapps/foldit/migrations/0001_initial.py @@ -108,4 +108,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['foldit'] \ No newline at end of file + complete_apps = ['foldit'] diff --git a/lms/djangoapps/instructor/features/bulk_email.py b/lms/djangoapps/instructor/features/bulk_email.py index 473851022f..782cfdeb95 100644 --- a/lms/djangoapps/instructor/features/bulk_email.py +++ b/lms/djangoapps/instructor/features/bulk_email.py @@ -3,7 +3,7 @@ Define steps for bulk email acceptance test. """ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from lettuce.django import mail diff --git a/lms/djangoapps/instructor/features/common.py b/lms/djangoapps/instructor/features/common.py index 3d511b2b9b..3952140d75 100644 --- a/lms/djangoapps/instructor/features/common.py +++ b/lms/djangoapps/instructor/features/common.py @@ -3,7 +3,7 @@ Define common steps for instructor dashboard acceptance tests. """ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from __future__ import absolute_import diff --git a/lms/djangoapps/instructor/features/data_download.py b/lms/djangoapps/instructor/features/data_download.py index 93aedec5ec..4e3164742c 100644 --- a/lms/djangoapps/instructor/features/data_download.py +++ b/lms/djangoapps/instructor/features/data_download.py @@ -4,7 +4,7 @@ acceptance tests. """ # pylint: disable=C0111 -# pylint: disable=W0621 +# pylint: disable=redefined-outer-name from lettuce import world, step from nose.tools import assert_in, assert_regexp_matches # pylint: disable=E0611 diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 1f6429d28e..608409457a 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -747,7 +747,7 @@ def get_grading_config(request, course_id): @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_sale_records(request, course_id, csv=False): # pylint: disable=W0613, W0621 +def get_sale_records(request, course_id, csv=False): # pylint: disable=W0613, redefined-outer-name """ return the summary of all sales records for a particular course """ @@ -778,7 +778,7 @@ def get_sale_records(request, course_id, csv=False): # pylint: disable=W0613, W @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_sale_order_records(request, course_id): # pylint: disable=W0613, W0621 +def get_sale_order_records(request, course_id): # pylint: disable=W0613, redefined-outer-name """ return the summary of all sales records for a particular course """ @@ -878,7 +878,7 @@ def re_validate_invoice(obj_invoice): @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_purchase_transaction(request, course_id, csv=False): # pylint: disable=W0613, W0621 +def get_purchase_transaction(request, course_id, csv=False): # pylint: disable=W0613, redefined-outer-name """ return the summary of all purchased transactions for a particular course """ @@ -906,7 +906,7 @@ def get_purchase_transaction(request, course_id, csv=False): # pylint: disable= @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_students_features(request, course_id, csv=False): # pylint: disable=W0613, W0621 +def get_students_features(request, course_id, csv=False): # pylint: disable=W0613, redefined-outer-name """ Respond with json which contains a summary of all enrolled students profile information. @@ -1107,7 +1107,7 @@ def generate_registration_codes(request, course_id): internal_reference=internal_reference, customer_reference_number=customer_reference_number ) registration_codes = [] - for _ in range(course_code_number): # pylint: disable=W0621 + for _ in range(course_code_number): # pylint: disable=redefined-outer-name generated_registration_code = save_registration_code(request.user, course_id, sale_invoice, order=None) registration_codes.append(generated_registration_code) diff --git a/lms/djangoapps/instructor_task/migrations/0001_initial.py b/lms/djangoapps/instructor_task/migrations/0001_initial.py index 4e12f292c1..add6f0b7f1 100644 --- a/lms/djangoapps/instructor_task/migrations/0001_initial.py +++ b/lms/djangoapps/instructor_task/migrations/0001_initial.py @@ -83,4 +83,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['instructor_task'] \ No newline at end of file + complete_apps = ['instructor_task'] diff --git a/lms/djangoapps/instructor_task/migrations/0002_add_subtask_field.py b/lms/djangoapps/instructor_task/migrations/0002_add_subtask_field.py index 845dffd856..81e55c6e16 100644 --- a/lms/djangoapps/instructor_task/migrations/0002_add_subtask_field.py +++ b/lms/djangoapps/instructor_task/migrations/0002_add_subtask_field.py @@ -73,4 +73,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['instructor_task'] \ No newline at end of file + complete_apps = ['instructor_task'] diff --git a/lms/djangoapps/linkedin/migrations/0001_initial.py b/lms/djangoapps/linkedin/migrations/0001_initial.py index b6ceeef7d7..d8dee9089d 100644 --- a/lms/djangoapps/linkedin/migrations/0001_initial.py +++ b/lms/djangoapps/linkedin/migrations/0001_initial.py @@ -67,4 +67,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['linkedin'] \ No newline at end of file + complete_apps = ['linkedin'] diff --git a/lms/djangoapps/notes/migrations/0001_initial.py b/lms/djangoapps/notes/migrations/0001_initial.py index 1629b2355d..6b0a071212 100644 --- a/lms/djangoapps/notes/migrations/0001_initial.py +++ b/lms/djangoapps/notes/migrations/0001_initial.py @@ -87,4 +87,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['notes'] \ No newline at end of file + complete_apps = ['notes'] diff --git a/lms/djangoapps/shoppingcart/migrations/0004_auto__add_field_orderitem_fulfilled_time.py b/lms/djangoapps/shoppingcart/migrations/0004_auto__add_field_orderitem_fulfilled_time.py index bbaf185184..4271a24840 100644 --- a/lms/djangoapps/shoppingcart/migrations/0004_auto__add_field_orderitem_fulfilled_time.py +++ b/lms/djangoapps/shoppingcart/migrations/0004_auto__add_field_orderitem_fulfilled_time.py @@ -111,4 +111,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report.py b/lms/djangoapps/shoppingcart/migrations/0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report.py index 04d37c730a..1e92306140 100644 --- a/lms/djangoapps/shoppingcart/migrations/0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report.py +++ b/lms/djangoapps/shoppingcart/migrations/0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report.py @@ -129,4 +129,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques.py b/lms/djangoapps/shoppingcart/migrations/0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques.py index 13e001cfd0..cd8ee5b198 100644 --- a/lms/djangoapps/shoppingcart/migrations/0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques.py +++ b/lms/djangoapps/shoppingcart/migrations/0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques.py @@ -128,4 +128,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0007_auto__add_field_orderitem_service_fee.py b/lms/djangoapps/shoppingcart/migrations/0007_auto__add_field_orderitem_service_fee.py index 227b8ccc0f..bc086c05c2 100644 --- a/lms/djangoapps/shoppingcart/migrations/0007_auto__add_field_orderitem_service_fee.py +++ b/lms/djangoapps/shoppingcart/migrations/0007_auto__add_field_orderitem_service_fee.py @@ -139,4 +139,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0008_auto__add_coupons__add_couponredemption__chg_field_certificateitem_cou.py b/lms/djangoapps/shoppingcart/migrations/0008_auto__add_coupons__add_couponredemption__chg_field_certificateitem_cou.py index 8ff9a0d7ae..f64f20edd7 100644 --- a/lms/djangoapps/shoppingcart/migrations/0008_auto__add_coupons__add_couponredemption__chg_field_certificateitem_cou.py +++ b/lms/djangoapps/shoppingcart/migrations/0008_auto__add_coupons__add_couponredemption__chg_field_certificateitem_cou.py @@ -186,4 +186,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0009_auto__del_coupons__add_courseregistrationcode__add_coupon__chg_field_c.py b/lms/djangoapps/shoppingcart/migrations/0009_auto__del_coupons__add_courseregistrationcode__add_coupon__chg_field_c.py index 3850c10499..f17db05296 100644 --- a/lms/djangoapps/shoppingcart/migrations/0009_auto__del_coupons__add_courseregistrationcode__add_coupon__chg_field_c.py +++ b/lms/djangoapps/shoppingcart/migrations/0009_auto__del_coupons__add_courseregistrationcode__add_coupon__chg_field_c.py @@ -213,4 +213,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode.py b/lms/djangoapps/shoppingcart/migrations/0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode.py index 0dca784fd6..fd740f9fff 100644 --- a/lms/djangoapps/shoppingcart/migrations/0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode.py +++ b/lms/djangoapps/shoppingcart/migrations/0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode.py @@ -184,4 +184,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0011_auto__add_invoice__add_field_courseregistrationcode_invoice.py b/lms/djangoapps/shoppingcart/migrations/0011_auto__add_invoice__add_field_courseregistrationcode_invoice.py index d67d48e426..75ecf4b321 100644 --- a/lms/djangoapps/shoppingcart/migrations/0011_auto__add_invoice__add_field_courseregistrationcode_invoice.py +++ b/lms/djangoapps/shoppingcart/migrations/0011_auto__add_invoice__add_field_courseregistrationcode_invoice.py @@ -183,4 +183,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0012_auto__del_field_courseregistrationcode_transaction_group_name__del_fie.py b/lms/djangoapps/shoppingcart/migrations/0012_auto__del_field_courseregistrationcode_transaction_group_name__del_fie.py index 77c7635538..0c5c72edd4 100644 --- a/lms/djangoapps/shoppingcart/migrations/0012_auto__del_field_courseregistrationcode_transaction_group_name__del_fie.py +++ b/lms/djangoapps/shoppingcart/migrations/0012_auto__del_field_courseregistrationcode_transaction_group_name__del_fie.py @@ -249,4 +249,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0013_auto__add_field_invoice_is_valid.py b/lms/djangoapps/shoppingcart/migrations/0013_auto__add_field_invoice_is_valid.py index 2520a8b182..a898be5e75 100644 --- a/lms/djangoapps/shoppingcart/migrations/0013_auto__add_field_invoice_is_valid.py +++ b/lms/djangoapps/shoppingcart/migrations/0013_auto__add_field_invoice_is_valid.py @@ -170,4 +170,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0014_auto__del_field_invoice_tax_id__add_field_invoice_address_line_1__add_.py b/lms/djangoapps/shoppingcart/migrations/0014_auto__del_field_invoice_tax_id__add_field_invoice_address_line_1__add_.py index fe727666cb..13ee149ff3 100644 --- a/lms/djangoapps/shoppingcart/migrations/0014_auto__del_field_invoice_tax_id__add_field_invoice_address_line_1__add_.py +++ b/lms/djangoapps/shoppingcart/migrations/0014_auto__del_field_invoice_tax_id__add_field_invoice_address_line_1__add_.py @@ -241,4 +241,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0015_auto__del_field_invoice_purchase_order_number__del_field_invoice_compa.py b/lms/djangoapps/shoppingcart/migrations/0015_auto__del_field_invoice_purchase_order_number__del_field_invoice_compa.py index 3d30974e15..a934b1344b 100644 --- a/lms/djangoapps/shoppingcart/migrations/0015_auto__del_field_invoice_purchase_order_number__del_field_invoice_compa.py +++ b/lms/djangoapps/shoppingcart/migrations/0015_auto__del_field_invoice_purchase_order_number__del_field_invoice_compa.py @@ -226,4 +226,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0016_auto__del_field_invoice_company_email__del_field_invoice_company_refer.py b/lms/djangoapps/shoppingcart/migrations/0016_auto__del_field_invoice_company_email__del_field_invoice_company_refer.py index ae9e50d87e..f5baab13b6 100644 --- a/lms/djangoapps/shoppingcart/migrations/0016_auto__del_field_invoice_company_email__del_field_invoice_company_refer.py +++ b/lms/djangoapps/shoppingcart/migrations/0016_auto__del_field_invoice_company_email__del_field_invoice_company_refer.py @@ -202,4 +202,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0017_auto__add_field_courseregistrationcode_order__chg_field_registrationco.py b/lms/djangoapps/shoppingcart/migrations/0017_auto__add_field_courseregistrationcode_order__chg_field_registrationco.py index 35f00e2af6..5e6ae048cc 100644 --- a/lms/djangoapps/shoppingcart/migrations/0017_auto__add_field_courseregistrationcode_order__chg_field_registrationco.py +++ b/lms/djangoapps/shoppingcart/migrations/0017_auto__add_field_courseregistrationcode_order__chg_field_registrationco.py @@ -185,4 +185,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['shoppingcart'] \ No newline at end of file + complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index f61080981f..d058b414e9 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -151,7 +151,7 @@ class ShoppingCartViewsTests(ModuleStoreTestCase): resp = self.client.get(billing_url) self.assertEqual(resp.status_code, 200) - ((template, context), _) = render_mock.call_args # pylint: disable=W0621 + ((template, context), _) = render_mock.call_args # pylint: disable=redefined-outer-name self.assertEqual(template, 'shoppingcart/billing_details.html') # check for the default currency in the context self.assertEqual(context['currency'], 'usd') @@ -179,7 +179,7 @@ class ShoppingCartViewsTests(ModuleStoreTestCase): resp = self.client.get(billing_url) self.assertEqual(resp.status_code, 200) - ((template, context), _) = render_mock.call_args # pylint: disable=W0621 + ((template, context), _) = render_mock.call_args # pylint: disable=redefined-outer-name self.assertEqual(template, 'shoppingcart/billing_details.html') # check for the override currency settings in the context self.assertEqual(context['currency'], 'PKR') @@ -669,7 +669,7 @@ class ShoppingCartViewsTests(ModuleStoreTestCase): resp = self.client.get(reverse('shoppingcart.views.show_cart', args=[])) self.assertEqual(resp.status_code, 200) - ((purchase_form_arg_cart,), _) = form_mock.call_args # pylint: disable=W0621 + ((purchase_form_arg_cart,), _) = form_mock.call_args # pylint: disable=redefined-outer-name purchase_form_arg_cart_items = purchase_form_arg_cart.orderitem_set.all().select_subclasses() self.assertIn(reg_item, purchase_form_arg_cart_items) self.assertIn(cert_item, purchase_form_arg_cart_items) @@ -693,7 +693,7 @@ class ShoppingCartViewsTests(ModuleStoreTestCase): resp = self.client.get(reverse('shoppingcart.views.show_cart', args=[])) self.assertEqual(resp.status_code, 200) - ((purchase_form_arg_cart,), _) = form_mock.call_args # pylint: disable=W0621 + ((purchase_form_arg_cart,), _) = form_mock.call_args # pylint: disable=redefined-outer-name purchase_form_arg_cart_items = purchase_form_arg_cart.orderitem_set.all().select_subclasses() self.assertIn(reg_item, purchase_form_arg_cart_items) @@ -849,7 +849,7 @@ class ShoppingCartViewsTests(ModuleStoreTestCase): resp = self.client.get(reverse('shoppingcart.views.show_receipt', args=[self.cart.id])) self.assertEqual(resp.status_code, 200) - ((template, context), _) = render_mock.call_args # pylint: disable=W0621 + ((template, context), _) = render_mock.call_args # pylint: disable=redefined-outer-name self.assertEqual(template, 'shoppingcart/receipt.html') self.assertEqual(context['order'], self.cart) self.assertEqual(context['order'].total_cost, self.testing_cost) @@ -882,7 +882,7 @@ class ShoppingCartViewsTests(ModuleStoreTestCase): self.assertIn('FirstNameTesting123', resp.content) self.assertIn('80.00', resp.content) - ((template, context), _) = render_mock.call_args # pylint: disable=W0621 + ((template, context), _) = render_mock.call_args # pylint: disable=redefined-outer-name self.assertEqual(template, 'shoppingcart/receipt.html') self.assertEqual(context['order'], self.cart) self.assertIn(reg_item, context['shoppingcart_items'][0]) @@ -903,7 +903,7 @@ class ShoppingCartViewsTests(ModuleStoreTestCase): resp = self.client.get(reverse('shoppingcart.views.show_receipt', args=[self.cart.id])) self.assertEqual(resp.status_code, 200) - ((template, context), _) = render_mock.call_args # pylint: disable=W0621 + ((template, context), _) = render_mock.call_args # pylint: disable=redefined-outer-name self.assertEqual(template, 'shoppingcart/receipt.html') self.assertIn(reg_item, context['shoppingcart_items'][0]) self.assertIn(cert_item, context['shoppingcart_items'][1]) @@ -944,7 +944,7 @@ class ShoppingCartViewsTests(ModuleStoreTestCase): # check for the enrollment codes content self.assertIn('Please send each professional one of these unique registration codes to enroll into the course.', resp.content) - ((template, context), _) = render_mock.call_args # pylint: disable=W0621 + ((template, context), _) = render_mock.call_args # pylint: disable=redefined-outer-name self.assertEqual(template, 'shoppingcart/receipt.html') self.assertEqual(context['order'], self.cart) self.assertIn(reg_item, context['shoppingcart_items'][0]) diff --git a/lms/djangoapps/verify_student/migrations/0001_initial.py b/lms/djangoapps/verify_student/migrations/0001_initial.py index 65ffafc49b..31068d9dd5 100644 --- a/lms/djangoapps/verify_student/migrations/0001_initial.py +++ b/lms/djangoapps/verify_student/migrations/0001_initial.py @@ -93,4 +93,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['verify_student'] \ No newline at end of file + complete_apps = ['verify_student'] diff --git a/lms/djangoapps/verify_student/migrations/0002_auto__add_field_softwaresecurephotoverification_window.py b/lms/djangoapps/verify_student/migrations/0002_auto__add_field_softwaresecurephotoverification_window.py index 0672427d31..38ced7fe98 100644 --- a/lms/djangoapps/verify_student/migrations/0002_auto__add_field_softwaresecurephotoverification_window.py +++ b/lms/djangoapps/verify_student/migrations/0002_auto__add_field_softwaresecurephotoverification_window.py @@ -85,4 +85,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['verify_student'] \ No newline at end of file + complete_apps = ['verify_student'] diff --git a/lms/djangoapps/verify_student/migrations/0003_auto__add_field_softwaresecurephotoverification_display.py b/lms/djangoapps/verify_student/migrations/0003_auto__add_field_softwaresecurephotoverification_display.py index 3c41289180..c91f7797a1 100644 --- a/lms/djangoapps/verify_student/migrations/0003_auto__add_field_softwaresecurephotoverification_display.py +++ b/lms/djangoapps/verify_student/migrations/0003_auto__add_field_softwaresecurephotoverification_display.py @@ -86,4 +86,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['verify_student'] \ No newline at end of file + complete_apps = ['verify_student'] From e0f1d3f3f3e40fc110d36d5109a56a328b9559e9 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sat, 29 Nov 2014 23:01:00 -0500 Subject: [PATCH 02/39] s/pylint: disable=C0111/pylint: disable=missing-docstring/ --- .../contentstore/features/advanced_settings.py | 2 +- cms/djangoapps/contentstore/features/checklists.py | 2 +- cms/djangoapps/contentstore/features/common.py | 2 +- cms/djangoapps/contentstore/features/component.py | 2 +- .../features/component_settings_editor_helpers.py | 2 +- .../contentstore/features/course-export.py | 2 +- .../contentstore/features/course-outline.py | 2 +- .../contentstore/features/course-settings.py | 2 +- .../contentstore/features/course-team.py | 2 +- .../contentstore/features/course-updates.py | 2 +- .../contentstore/features/course_import.py | 2 +- cms/djangoapps/contentstore/features/courses.py | 2 +- .../contentstore/features/discussion-editor.py | 2 +- cms/djangoapps/contentstore/features/grading.py | 2 +- cms/djangoapps/contentstore/features/help.py | 2 +- .../contentstore/features/html-editor.py | 2 +- cms/djangoapps/contentstore/features/pages.py | 2 +- .../contentstore/features/problem-editor.py | 2 +- cms/djangoapps/contentstore/features/signup.py | 2 +- cms/djangoapps/contentstore/features/textbooks.py | 2 +- .../contentstore/features/transcripts.py | 2 +- cms/djangoapps/contentstore/features/upload.py | 2 +- .../contentstore/features/video_editor.py | 2 +- .../contentstore/features/video_handout.py | 2 +- cms/djangoapps/contentstore/views/error.py | 2 +- common/djangoapps/enrollment/serializers.py | 2 +- common/djangoapps/student/tests/factories.py | 2 +- common/djangoapps/terrain/course_helpers.py | 2 +- common/djangoapps/terrain/steps.py | 2 +- common/djangoapps/terrain/ui_helpers.py | 2 +- common/djangoapps/user_api/tests/factories.py | 2 +- .../modulestore/tests/persistent_factories.py | 2 +- .../lib/xmodule/xmodule/tests/test_capa_module.py | 2 +- .../lib/xmodule/xmodule/tests/test_xml_module.py | 2 +- .../xmodule/video_module/transcripts_utils.py | 8 ++++---- lms/djangoapps/bulk_email/forms.py | 4 ++-- lms/djangoapps/bulk_email/models.py | 4 ++-- lms/djangoapps/courseware/features/certificates.py | 2 +- lms/djangoapps/courseware/features/common.py | 2 +- lms/djangoapps/courseware/features/conditional.py | 2 +- lms/djangoapps/courseware/features/courseware.py | 2 +- .../courseware/features/courseware_common.py | 2 +- lms/djangoapps/courseware/features/events.py | 2 +- lms/djangoapps/courseware/features/homepage.py | 2 +- lms/djangoapps/courseware/features/login.py | 2 +- lms/djangoapps/courseware/features/lti.py | 2 +- lms/djangoapps/courseware/features/navigation.py | 2 +- lms/djangoapps/courseware/features/openended.py | 2 +- lms/djangoapps/courseware/features/problems.py | 2 +- .../courseware/features/problems_setup.py | 2 +- lms/djangoapps/courseware/features/registration.py | 2 +- lms/djangoapps/courseware/features/signup.py | 2 +- lms/djangoapps/courseware/features/video.py | 2 +- lms/djangoapps/courseware/features/word_cloud.py | 2 +- lms/djangoapps/courseware/tests/factories.py | 2 +- lms/djangoapps/courseware/tests/test_access.py | 2 +- lms/djangoapps/dashboard/tests/test_support.py | 2 +- lms/djangoapps/django_comment_client/base/tests.py | 2 +- .../django_comment_client/forum/tests.py | 2 +- lms/djangoapps/instructor/features/bulk_email.py | 2 +- lms/djangoapps/instructor/features/common.py | 2 +- .../instructor/features/data_download.py | 2 +- .../instructor/tests/test_hint_manager.py | 2 +- lms/djangoapps/instructor/tests/test_legacy_xss.py | 2 +- lms/djangoapps/instructor/views/api.py | 14 +++++++------- lms/djangoapps/mobile_api/users/serializers.py | 4 ++-- lms/djangoapps/shoppingcart/exceptions.py | 2 +- lms/djangoapps/survey/admin.py | 2 +- lms/djangoapps/verify_student/exceptions.py | 2 +- 69 files changed, 81 insertions(+), 81 deletions(-) diff --git a/cms/djangoapps/contentstore/features/advanced_settings.py b/cms/djangoapps/contentstore/features/advanced_settings.py index 87b00610b5..242fde629a 100644 --- a/cms/djangoapps/contentstore/features/advanced_settings.py +++ b/cms/djangoapps/contentstore/features/advanced_settings.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/checklists.py b/cms/djangoapps/contentstore/features/checklists.py index 92c39cc0cd..9b1d427674 100644 --- a/cms/djangoapps/contentstore/features/checklists.py +++ b/cms/djangoapps/contentstore/features/checklists.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index 023a03f1f3..b0681433b0 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name import os diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index 93df2be2ec..04d5680ef4 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # Lettuce formats proposed definitions for unimplemented steps with the diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index 749f611469..4cd814acd8 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -1,5 +1,5 @@ # disable missing docstring -# pylint: disable=C0111 +# pylint: disable=missing-docstring from lettuce import world from nose.tools import assert_equal, assert_in # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/features/course-export.py b/cms/djangoapps/contentstore/features/course-export.py index 0077c17bfa..9c8b09f5ba 100644 --- a/cms/djangoapps/contentstore/features/course-export.py +++ b/cms/djangoapps/contentstore/features/course-export.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=W0613 diff --git a/cms/djangoapps/contentstore/features/course-outline.py b/cms/djangoapps/contentstore/features/course-outline.py index 94e41b33e5..141aaa1724 100644 --- a/cms/djangoapps/contentstore/features/course-outline.py +++ b/cms/djangoapps/contentstore/features/course-outline.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/course-settings.py b/cms/djangoapps/contentstore/features/course-settings.py index 44c2b69c45..bc307e5072 100644 --- a/cms/djangoapps/contentstore/features/course-settings.py +++ b/cms/djangoapps/contentstore/features/course-settings.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/course-team.py b/cms/djangoapps/contentstore/features/course-team.py index 2c7abd40b0..855a6d143a 100644 --- a/cms/djangoapps/contentstore/features/course-team.py +++ b/cms/djangoapps/contentstore/features/course-team.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/course-updates.py b/cms/djangoapps/contentstore/features/course-updates.py index 064b4eb5a5..6285c61678 100644 --- a/cms/djangoapps/contentstore/features/course-updates.py +++ b/cms/djangoapps/contentstore/features/course-updates.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/course_import.py b/cms/djangoapps/contentstore/features/course_import.py index f3090a12ee..80365d3884 100644 --- a/cms/djangoapps/contentstore/features/course_import.py +++ b/cms/djangoapps/contentstore/features/course_import.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=W0613 diff --git a/cms/djangoapps/contentstore/features/courses.py b/cms/djangoapps/contentstore/features/courses.py index 2f2f47b30c..7b3ccbcbd2 100644 --- a/cms/djangoapps/contentstore/features/courses.py +++ b/cms/djangoapps/contentstore/features/courses.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/discussion-editor.py b/cms/djangoapps/contentstore/features/discussion-editor.py index bca91f1a74..1a04ec0e09 100644 --- a/cms/djangoapps/contentstore/features/discussion-editor.py +++ b/cms/djangoapps/contentstore/features/discussion-editor.py @@ -1,5 +1,5 @@ # disable missing docstring -# pylint: disable=C0111 +# pylint: disable=missing-docstring from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/grading.py b/cms/djangoapps/contentstore/features/grading.py index b953b66e24..e10fb39a4f 100644 --- a/cms/djangoapps/contentstore/features/grading.py +++ b/cms/djangoapps/contentstore/features/grading.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/help.py b/cms/djangoapps/contentstore/features/help.py index ffa2cbd3d0..25ad14aa99 100644 --- a/cms/djangoapps/contentstore/features/help.py +++ b/cms/djangoapps/contentstore/features/help.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=W0613 diff --git a/cms/djangoapps/contentstore/features/html-editor.py b/cms/djangoapps/contentstore/features/html-editor.py index 978487533e..98d57f477d 100644 --- a/cms/djangoapps/contentstore/features/html-editor.py +++ b/cms/djangoapps/contentstore/features/html-editor.py @@ -1,5 +1,5 @@ # disable missing docstring -# pylint: disable=C0111 +# pylint: disable=missing-docstring from collections import OrderedDict diff --git a/cms/djangoapps/contentstore/features/pages.py b/cms/djangoapps/contentstore/features/pages.py index 983c005192..36d3a85df1 100644 --- a/cms/djangoapps/contentstore/features/pages.py +++ b/cms/djangoapps/contentstore/features/pages.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=W0613 diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py index 7ad4675f6f..c7b3dd3069 100644 --- a/cms/djangoapps/contentstore/features/problem-editor.py +++ b/cms/djangoapps/contentstore/features/problem-editor.py @@ -1,5 +1,5 @@ # disable missing docstring -# pylint: disable=C0111 +# pylint: disable=missing-docstring import json from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/signup.py b/cms/djangoapps/contentstore/features/signup.py index 5e4fc6c3d6..26374fe963 100644 --- a/cms/djangoapps/contentstore/features/signup.py +++ b/cms/djangoapps/contentstore/features/signup.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/textbooks.py b/cms/djangoapps/contentstore/features/textbooks.py index 4be767d776..4cfba5dca5 100644 --- a/cms/djangoapps/contentstore/features/textbooks.py +++ b/cms/djangoapps/contentstore/features/textbooks.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/transcripts.py b/cms/djangoapps/contentstore/features/transcripts.py index 11e815c155..8047252417 100644 --- a/cms/djangoapps/contentstore/features/transcripts.py +++ b/cms/djangoapps/contentstore/features/transcripts.py @@ -1,5 +1,5 @@ # disable missing docstring -# pylint: disable=C0111 +# pylint: disable=missing-docstring import os from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/upload.py b/cms/djangoapps/contentstore/features/upload.py index 84ec55c956..bd483ca3a7 100644 --- a/cms/djangoapps/contentstore/features/upload.py +++ b/cms/djangoapps/contentstore/features/upload.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/video_editor.py b/cms/djangoapps/contentstore/features/video_editor.py index a515f63ec6..687f65e898 100644 --- a/cms/djangoapps/contentstore/features/video_editor.py +++ b/cms/djangoapps/contentstore/features/video_editor.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # disable missing docstring -# pylint: disable=C0111 +# pylint: disable=missing-docstring import requests from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/video_handout.py b/cms/djangoapps/contentstore/features/video_handout.py index 63a9e42c9e..9f3aa2c090 100644 --- a/cms/djangoapps/contentstore/features/video_handout.py +++ b/cms/djangoapps/contentstore/features/video_handout.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # disable missing docstring -# pylint: disable=C0111 +# pylint: disable=missing-docstring from lettuce import world, step from nose.tools import assert_true # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/views/error.py b/cms/djangoapps/contentstore/views/error.py index 40e117fc18..2400d63b66 100644 --- a/cms/djangoapps/contentstore/views/error.py +++ b/cms/djangoapps/contentstore/views/error.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111,W0613 +# pylint: disable=missing-docstring,W0613 from django.http import (HttpResponse, HttpResponseServerError, HttpResponseNotFound) diff --git a/common/djangoapps/enrollment/serializers.py b/common/djangoapps/enrollment/serializers.py index 7ec8b6bc16..e95df0943a 100644 --- a/common/djangoapps/enrollment/serializers.py +++ b/common/djangoapps/enrollment/serializers.py @@ -60,7 +60,7 @@ class CourseEnrollmentSerializer(serializers.ModelSerializer): """Retrieves the username from the associated model.""" return model.username - class Meta: # pylint: disable=C0111 + class Meta: # pylint: disable=missing-docstring model = CourseEnrollment fields = ('created', 'mode', 'is_active', 'course', 'student') lookup_field = 'username' diff --git a/common/djangoapps/student/tests/factories.py b/common/djangoapps/student/tests/factories.py index e419b56ea3..1c99eead81 100644 --- a/common/djangoapps/student/tests/factories.py +++ b/common/djangoapps/student/tests/factories.py @@ -13,7 +13,7 @@ from pytz import UTC from opaque_keys.edx.locations import SlashSeparatedCourseKey # Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232, C0111 +# pylint: disable=W0232, missing-docstring class GroupFactory(DjangoModelFactory): diff --git a/common/djangoapps/terrain/course_helpers.py b/common/djangoapps/terrain/course_helpers.py index 5edabf2e37..f13f10b0b9 100644 --- a/common/djangoapps/terrain/course_helpers.py +++ b/common/djangoapps/terrain/course_helpers.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name import urllib diff --git a/common/djangoapps/terrain/steps.py b/common/djangoapps/terrain/steps.py index e44f36de5b..0a5db23754 100644 --- a/common/djangoapps/terrain/steps.py +++ b/common/djangoapps/terrain/steps.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # Disable the "wildcard import" warning so we can bring in all methods from diff --git a/common/djangoapps/terrain/ui_helpers.py b/common/djangoapps/terrain/ui_helpers.py index 891e6bf6af..b26b311326 100644 --- a/common/djangoapps/terrain/ui_helpers.py +++ b/common/djangoapps/terrain/ui_helpers.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world diff --git a/common/djangoapps/user_api/tests/factories.py b/common/djangoapps/user_api/tests/factories.py index 3308c2f2ab..25be6bf188 100644 --- a/common/djangoapps/user_api/tests/factories.py +++ b/common/djangoapps/user_api/tests/factories.py @@ -7,7 +7,7 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey # Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232, C0111 +# pylint: disable=W0232, missing-docstring class UserPreferenceFactory(DjangoModelFactory): FACTORY_FOR = UserPreference diff --git a/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py b/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py index a292212a1a..a98400ee4a 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py @@ -6,7 +6,7 @@ import factory from factory.helpers import lazy_attribute from opaque_keys.edx.keys import UsageKey # Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232, C0111 +# pylint: disable=W0232, missing-docstring class SplitFactory(factory.Factory): diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index 045af6d390..eb7a01864d 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -2,7 +2,7 @@ """ Tests of the Capa XModule """ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=R0904 # pylint: disable=C0103 # pylint: disable=C0302 diff --git a/common/lib/xmodule/xmodule/tests/test_xml_module.py b/common/lib/xmodule/xmodule/tests/test_xml_module.py index dcdabcf433..36d22c0fba 100644 --- a/common/lib/xmodule/xmodule/tests/test_xml_module.py +++ b/common/lib/xmodule/xmodule/tests/test_xml_module.py @@ -1,5 +1,5 @@ # disable missing docstring -# pylint: disable=C0111 +# pylint: disable=missing-docstring import unittest diff --git a/common/lib/xmodule/xmodule/video_module/transcripts_utils.py b/common/lib/xmodule/xmodule/video_module/transcripts_utils.py index 857cc6b5d2..e38dcd9fec 100644 --- a/common/lib/xmodule/xmodule/video_module/transcripts_utils.py +++ b/common/lib/xmodule/xmodule/video_module/transcripts_utils.py @@ -19,19 +19,19 @@ from xmodule.contentstore.django import contentstore log = logging.getLogger(__name__) -class TranscriptException(Exception): # pylint disable=C0111 +class TranscriptException(Exception): # pylint: disable=missing-docstring pass -class TranscriptsGenerationException(Exception): # pylint disable=C0111 +class TranscriptsGenerationException(Exception): # pylint: disable=missing-docstring pass -class GetTranscriptsFromYouTubeException(Exception): # pylint disable=C0111 +class GetTranscriptsFromYouTubeException(Exception): # pylint: disable=missing-docstring pass -class TranscriptsRequestValidationException(Exception): # pylint disable=C0111 +class TranscriptsRequestValidationException(Exception): # pylint: disable=missing-docstring pass diff --git a/lms/djangoapps/bulk_email/forms.py b/lms/djangoapps/bulk_email/forms.py index 815df5d3a6..3556b274c0 100644 --- a/lms/djangoapps/bulk_email/forms.py +++ b/lms/djangoapps/bulk_email/forms.py @@ -22,7 +22,7 @@ class CourseEmailTemplateForm(forms.ModelForm): # pylint: disable=R0924 name = forms.CharField(required=False) - class Meta: # pylint: disable=C0111 + class Meta: # pylint: disable=missing-docstring model = CourseEmailTemplate fields = ('html_template', 'plain_template', 'name') @@ -76,7 +76,7 @@ class CourseEmailTemplateForm(forms.ModelForm): # pylint: disable=R0924 class CourseAuthorizationAdminForm(forms.ModelForm): # pylint: disable=R0924 """Input form for email enabling, allowing us to verify data.""" - class Meta: # pylint: disable=C0111 + class Meta: # pylint: disable=missing-docstring model = CourseAuthorization def clean_course_id(self): diff --git a/lms/djangoapps/bulk_email/models.py b/lms/djangoapps/bulk_email/models.py index d3ce60d750..045edd99bb 100644 --- a/lms/djangoapps/bulk_email/models.py +++ b/lms/djangoapps/bulk_email/models.py @@ -43,7 +43,7 @@ class Email(models.Model): created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) - class Meta: # pylint: disable=C0111 + class Meta: # pylint: disable=missing-docstring abstract = True @@ -141,7 +141,7 @@ class Optout(models.Model): user = models.ForeignKey(User, db_index=True, null=True) course_id = CourseKeyField(max_length=255, db_index=True) - class Meta: # pylint: disable=C0111 + class Meta: # pylint: disable=missing-docstring unique_together = ('user', 'course_id') diff --git a/lms/djangoapps/courseware/features/certificates.py b/lms/djangoapps/courseware/features/certificates.py index 8d54f7c258..5c65225b14 100644 --- a/lms/djangoapps/courseware/features/certificates.py +++ b/lms/djangoapps/courseware/features/certificates.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/common.py b/lms/djangoapps/courseware/features/common.py index 7787244a33..b6eebe7b9e 100644 --- a/lms/djangoapps/courseware/features/common.py +++ b/lms/djangoapps/courseware/features/common.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from __future__ import absolute_import diff --git a/lms/djangoapps/courseware/features/conditional.py b/lms/djangoapps/courseware/features/conditional.py index f6b22d5ff5..2fab88f253 100644 --- a/lms/djangoapps/courseware/features/conditional.py +++ b/lms/djangoapps/courseware/features/conditional.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, steps diff --git a/lms/djangoapps/courseware/features/courseware.py b/lms/djangoapps/courseware/features/courseware.py index 644c063064..91de6ffe70 100644 --- a/lms/djangoapps/courseware/features/courseware.py +++ b/lms/djangoapps/courseware/features/courseware.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/courseware_common.py b/lms/djangoapps/courseware/features/courseware_common.py index 6c54ef3159..fb6dff6aa6 100644 --- a/lms/djangoapps/courseware/features/courseware_common.py +++ b/lms/djangoapps/courseware/features/courseware_common.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=unused-argument diff --git a/lms/djangoapps/courseware/features/events.py b/lms/djangoapps/courseware/features/events.py index 4f0d9adccf..eefd0e1b92 100644 --- a/lms/djangoapps/courseware/features/events.py +++ b/lms/djangoapps/courseware/features/events.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring from lettuce import step from lettuce import world diff --git a/lms/djangoapps/courseware/features/homepage.py b/lms/djangoapps/courseware/features/homepage.py index 0741551dc5..37858a132b 100644 --- a/lms/djangoapps/courseware/features/homepage.py +++ b/lms/djangoapps/courseware/features/homepage.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/login.py b/lms/djangoapps/courseware/features/login.py index 42f6cb19c2..0881a81eea 100644 --- a/lms/djangoapps/courseware/features/login.py +++ b/lms/djangoapps/courseware/features/login.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import step, world diff --git a/lms/djangoapps/courseware/features/lti.py b/lms/djangoapps/courseware/features/lti.py index d64f734bc9..2df7ea3de1 100644 --- a/lms/djangoapps/courseware/features/lti.py +++ b/lms/djangoapps/courseware/features/lti.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring import datetime import os import pytz diff --git a/lms/djangoapps/courseware/features/navigation.py b/lms/djangoapps/courseware/features/navigation.py index e766e1d496..72eb109a7a 100644 --- a/lms/djangoapps/courseware/features/navigation.py +++ b/lms/djangoapps/courseware/features/navigation.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/openended.py b/lms/djangoapps/courseware/features/openended.py index cf43cdacd1..9b48aed195 100644 --- a/lms/djangoapps/courseware/features/openended.py +++ b/lms/djangoapps/courseware/features/openended.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/problems.py b/lms/djangoapps/courseware/features/problems.py index 4175e64cd3..40ac5f790e 100644 --- a/lms/djangoapps/courseware/features/problems.py +++ b/lms/djangoapps/courseware/features/problems.py @@ -2,7 +2,7 @@ Steps for problem.feature lettuce tests ''' -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/problems_setup.py b/lms/djangoapps/courseware/features/problems_setup.py index 407c5068d8..1036eaa2c1 100644 --- a/lms/djangoapps/courseware/features/problems_setup.py +++ b/lms/djangoapps/courseware/features/problems_setup.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # EVERY PROBLEM TYPE MUST HAVE THE FOLLOWING: diff --git a/lms/djangoapps/courseware/features/registration.py b/lms/djangoapps/courseware/features/registration.py index 1b1bb94ed1..5b8f3c6250 100644 --- a/lms/djangoapps/courseware/features/registration.py +++ b/lms/djangoapps/courseware/features/registration.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/signup.py b/lms/djangoapps/courseware/features/signup.py index 10009cf0d7..5f35a40e9a 100644 --- a/lms/djangoapps/courseware/features/signup.py +++ b/lms/djangoapps/courseware/features/signup.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/video.py b/lms/djangoapps/courseware/features/video.py index 889a77b9d1..672c6648cb 100644 --- a/lms/djangoapps/courseware/features/video.py +++ b/lms/djangoapps/courseware/features/video.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# pylint: disable=C0111 +# pylint: disable=missing-docstring from lettuce import world, step, before, after import json diff --git a/lms/djangoapps/courseware/features/word_cloud.py b/lms/djangoapps/courseware/features/word_cloud.py index 90f6f6e8b5..fa0ea081a8 100644 --- a/lms/djangoapps/courseware/features/word_cloud.py +++ b/lms/djangoapps/courseware/features/word_cloud.py @@ -1,4 +1,4 @@ -# pylint: disable=C0111 +# pylint: disable=missing-docstring from time import sleep diff --git a/lms/djangoapps/courseware/tests/factories.py b/lms/djangoapps/courseware/tests/factories.py index 073d0085c8..7770d13db3 100644 --- a/lms/djangoapps/courseware/tests/factories.py +++ b/lms/djangoapps/courseware/tests/factories.py @@ -1,5 +1,5 @@ # Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232, C0111 +# pylint: disable=W0232, missing-docstring import json from functools import partial import factory diff --git a/lms/djangoapps/courseware/tests/test_access.py b/lms/djangoapps/courseware/tests/test_access.py index c2f6ea2b81..bd2a8217a7 100644 --- a/lms/djangoapps/courseware/tests/test_access.py +++ b/lms/djangoapps/courseware/tests/test_access.py @@ -15,7 +15,7 @@ from xmodule.course_module import ( CATALOG_VISIBILITY_CATALOG_AND_ABOUT, CATALOG_VISIBILITY_ABOUT, CATALOG_VISIBILITY_NONE) -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=W0212 diff --git a/lms/djangoapps/dashboard/tests/test_support.py b/lms/djangoapps/dashboard/tests/test_support.py index 24a2a78890..b008822dac 100644 --- a/lms/djangoapps/dashboard/tests/test_support.py +++ b/lms/djangoapps/dashboard/tests/test_support.py @@ -49,7 +49,7 @@ class RefundTests(ModuleStoreTestCase): Order.objects.filter(user=self.student).delete() def _enroll(self, purchase=True): - # pylint: disable=C0111 + # pylint: disable=missing-docstring CourseEnrollment.enroll(self.student, self.course_id, self.course_mode.mode_slug) if purchase: self.order = Order.get_cart_for_user(self.student) diff --git a/lms/djangoapps/django_comment_client/base/tests.py b/lms/djangoapps/django_comment_client/base/tests.py index bf4c0fe872..67b1eb91a4 100644 --- a/lms/djangoapps/django_comment_client/base/tests.py +++ b/lms/djangoapps/django_comment_client/base/tests.py @@ -27,7 +27,7 @@ log = logging.getLogger(__name__) CS_PREFIX = "http://localhost:4567/api/v1" -# pylint: disable=C0111 +# pylint: disable=missing-docstring class MockRequestSetupMixin(object): diff --git a/lms/djangoapps/django_comment_client/forum/tests.py b/lms/djangoapps/django_comment_client/forum/tests.py index 2bec1572ed..c435b2dc86 100644 --- a/lms/djangoapps/django_comment_client/forum/tests.py +++ b/lms/djangoapps/django_comment_client/forum/tests.py @@ -30,7 +30,7 @@ TEST_DATA_MONGO_MODULESTORE = mixed_store_config(TEST_DATA_DIR, {}, include_xml= log = logging.getLogger(__name__) -# pylint: disable=C0111 +# pylint: disable=missing-docstring @override_settings(MODULESTORE=TEST_DATA_MONGO_MODULESTORE) diff --git a/lms/djangoapps/instructor/features/bulk_email.py b/lms/djangoapps/instructor/features/bulk_email.py index 782cfdeb95..654de88ded 100644 --- a/lms/djangoapps/instructor/features/bulk_email.py +++ b/lms/djangoapps/instructor/features/bulk_email.py @@ -2,7 +2,7 @@ Define steps for bulk email acceptance test. """ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/instructor/features/common.py b/lms/djangoapps/instructor/features/common.py index 3952140d75..c3736b49dd 100644 --- a/lms/djangoapps/instructor/features/common.py +++ b/lms/djangoapps/instructor/features/common.py @@ -2,7 +2,7 @@ Define common steps for instructor dashboard acceptance tests. """ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from __future__ import absolute_import diff --git a/lms/djangoapps/instructor/features/data_download.py b/lms/djangoapps/instructor/features/data_download.py index 4e3164742c..4a072b78fe 100644 --- a/lms/djangoapps/instructor/features/data_download.py +++ b/lms/djangoapps/instructor/features/data_download.py @@ -3,7 +3,7 @@ Define steps for instructor dashboard - data download tab acceptance tests. """ -# pylint: disable=C0111 +# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step diff --git a/lms/djangoapps/instructor/tests/test_hint_manager.py b/lms/djangoapps/instructor/tests/test_hint_manager.py index a3446646f7..fb35f75ab9 100644 --- a/lms/djangoapps/instructor/tests/test_hint_manager.py +++ b/lms/djangoapps/instructor/tests/test_hint_manager.py @@ -12,7 +12,7 @@ from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory -# pylint: disable=C0111 +# pylint: disable=missing-docstring @override_settings(MODULESTORE=TEST_DATA_MONGO_MODULESTORE) diff --git a/lms/djangoapps/instructor/tests/test_legacy_xss.py b/lms/djangoapps/instructor/tests/test_legacy_xss.py index 310e9c3eb9..58bbf90765 100644 --- a/lms/djangoapps/instructor/tests/test_legacy_xss.py +++ b/lms/djangoapps/instructor/tests/test_legacy_xss.py @@ -15,7 +15,7 @@ from xmodule.modulestore.tests.factories import CourseFactory from instructor.views import legacy -# pylint: disable=C0111 +# pylint: disable=missing-docstring @override_settings(MODULESTORE=TEST_DATA_MONGO_MODULESTORE) diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 608409457a..0846a9ff2d 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -95,7 +95,7 @@ def common_exceptions_400(func): Catches common exceptions and renders matching 400 errors. (decorator without arguments) """ - def wrapped(request, *args, **kwargs): # pylint: disable=C0111 + def wrapped(request, *args, **kwargs): # pylint: disable=missing-docstring use_json = (request.is_ajax() or request.META.get("HTTP_ACCEPT", "").startswith("application/json")) try: @@ -129,8 +129,8 @@ def require_query_params(*args, **kwargs): required_params += [(key, kwargs[key]) for key in kwargs] # required_params = e.g. [('action', 'enroll or unenroll'), ['emails', None]] - def decorator(func): # pylint: disable=C0111 - def wrapped(*args, **kwargs): # pylint: disable=C0111 + def decorator(func): # pylint: disable=missing-docstring + def wrapped(*args, **kwargs): # pylint: disable=missing-docstring request = args[0] error_response_data = { @@ -166,8 +166,8 @@ def require_post_params(*args, **kwargs): required_params += [(key, kwargs[key]) for key in kwargs] # required_params = e.g. [('action', 'enroll or unenroll'), ['emails', None]] - def decorator(func): # pylint: disable=C0111 - def wrapped(*args, **kwargs): # pylint: disable=C0111 + def decorator(func): # pylint: disable=missing-docstring + def wrapped(*args, **kwargs): # pylint: disable=missing-docstring request = args[0] error_response_data = { @@ -206,8 +206,8 @@ def require_level(level): if level not in ['instructor', 'staff']: raise ValueError("unrecognized level '{}'".format(level)) - def decorator(func): # pylint: disable=C0111 - def wrapped(*args, **kwargs): # pylint: disable=C0111 + def decorator(func): # pylint: disable=missing-docstring + def wrapped(*args, **kwargs): # pylint: disable=missing-docstring request = args[0] course = get_course_by_id(SlashSeparatedCourseKey.from_deprecated_string(kwargs['course_id'])) diff --git a/lms/djangoapps/mobile_api/users/serializers.py b/lms/djangoapps/mobile_api/users/serializers.py index b0ae321a3c..267378f674 100644 --- a/lms/djangoapps/mobile_api/users/serializers.py +++ b/lms/djangoapps/mobile_api/users/serializers.py @@ -65,7 +65,7 @@ class CourseEnrollmentSerializer(serializers.ModelSerializer): """ course = CourseField() - class Meta: # pylint: disable=C0111 + class Meta: # pylint: disable=missing-docstring model = CourseEnrollment fields = ('created', 'mode', 'is_active', 'course') lookup_field = 'username' @@ -81,7 +81,7 @@ class UserSerializer(serializers.HyperlinkedModelSerializer): lookup_field='username' ) - class Meta: # pylint: disable=C0111 + class Meta: # pylint: disable=missing-docstring model = User fields = ('id', 'username', 'email', 'name', 'course_enrollments') lookup_field = 'username' diff --git a/lms/djangoapps/shoppingcart/exceptions.py b/lms/djangoapps/shoppingcart/exceptions.py index 6253c3bc46..12358deef6 100644 --- a/lms/djangoapps/shoppingcart/exceptions.py +++ b/lms/djangoapps/shoppingcart/exceptions.py @@ -2,7 +2,7 @@ Exceptions for the shoppingcart app """ # (Exception Class Names are sort of self-explanatory, so skipping docstring requirement) -# pylint: disable=C0111 +# pylint: disable=missing-docstring class PaymentException(Exception): diff --git a/lms/djangoapps/survey/admin.py b/lms/djangoapps/survey/admin.py index 3095c97001..45f30e89e3 100644 --- a/lms/djangoapps/survey/admin.py +++ b/lms/djangoapps/survey/admin.py @@ -10,7 +10,7 @@ from survey.models import SurveyForm class SurveyFormAdminForm(forms.ModelForm): # pylint: disable=R0924 """Form providing validation of SurveyForm content.""" - class Meta: # pylint: disable=C0111 + class Meta: # pylint: disable=missing-docstring model = SurveyForm fields = ('name', 'form') diff --git a/lms/djangoapps/verify_student/exceptions.py b/lms/djangoapps/verify_student/exceptions.py index d31fdb6a6d..d8634987ef 100644 --- a/lms/djangoapps/verify_student/exceptions.py +++ b/lms/djangoapps/verify_student/exceptions.py @@ -2,7 +2,7 @@ Exceptions for the verify student app """ # (Exception Class Names are sort of self-explanatory, so skipping docstring requirement) -# pylint: disable=C0111 +# pylint: disable=missing-docstring class WindowExpiredException(Exception): From 20e2ee9a5780bf7880642625368cbe6edba62fea Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sat, 29 Nov 2014 23:04:33 -0500 Subject: [PATCH 03/39] s/pylint: disable=E0611/pylint: disable=no-name-in-module/ --- cms/djangoapps/contentstore/features/advanced_settings.py | 2 +- cms/djangoapps/contentstore/features/checklists.py | 2 +- cms/djangoapps/contentstore/features/component.py | 2 +- .../contentstore/features/component_settings_editor_helpers.py | 2 +- cms/djangoapps/contentstore/features/course-outline.py | 2 +- cms/djangoapps/contentstore/features/course-settings.py | 2 +- cms/djangoapps/contentstore/features/course-team.py | 2 +- cms/djangoapps/contentstore/features/course-updates.py | 2 +- cms/djangoapps/contentstore/features/grading.py | 2 +- cms/djangoapps/contentstore/features/pages.py | 2 +- cms/djangoapps/contentstore/features/problem-editor.py | 2 +- cms/djangoapps/contentstore/features/upload.py | 2 +- cms/djangoapps/contentstore/features/video_editor.py | 2 +- cms/djangoapps/contentstore/features/video_handout.py | 2 +- common/djangoapps/static_replace/test/test_static_replace.py | 2 +- common/djangoapps/terrain/steps.py | 2 +- common/djangoapps/util/tests/test_date_utils.py | 2 +- .../lib/xmodule/xmodule/modulestore/tests/test_modulestore.py | 2 +- common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py | 2 +- common/lib/xmodule/xmodule/tests/test_stringify.py | 2 +- common/lib/xmodule/xmodule/tests/test_xml_module.py | 2 +- lms/djangoapps/courseware/features/homepage.py | 2 +- lms/djangoapps/courseware/features/openended.py | 2 +- lms/djangoapps/django_comment_client/base/tests.py | 2 +- lms/djangoapps/django_comment_client/forum/tests.py | 2 +- lms/djangoapps/instructor/features/bulk_email.py | 2 +- lms/djangoapps/instructor/features/common.py | 2 +- lms/djangoapps/instructor/features/data_download.py | 2 +- lms/djangoapps/licenses/tests.py | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/cms/djangoapps/contentstore/features/advanced_settings.py b/cms/djangoapps/contentstore/features/advanced_settings.py index 242fde629a..f85659bfa9 100644 --- a/cms/djangoapps/contentstore/features/advanced_settings.py +++ b/cms/djangoapps/contentstore/features/advanced_settings.py @@ -2,7 +2,7 @@ # pylint: disable=redefined-outer-name from lettuce import world, step -from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=E0611 +from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=no-name-in-module from common import type_in_codemirror, press_the_notification_button, get_codemirror_value KEY_CSS = '.key h3.title' diff --git a/cms/djangoapps/contentstore/features/checklists.py b/cms/djangoapps/contentstore/features/checklists.py index 9b1d427674..aad13a3120 100644 --- a/cms/djangoapps/contentstore/features/checklists.py +++ b/cms/djangoapps/contentstore/features/checklists.py @@ -2,7 +2,7 @@ # pylint: disable=redefined-outer-name from lettuce import world, step -from nose.tools import assert_true, assert_equal # pylint: disable=E0611 +from nose.tools import assert_true, assert_equal # pylint: disable=no-name-in-module from terrain.steps import reload_the_page from selenium.common.exceptions import StaleElementReferenceException diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index 04d5680ef4..daf73187ce 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -6,7 +6,7 @@ # pylint: disable=W0613 from lettuce import world, step -from nose.tools import assert_true, assert_in, assert_equal # pylint: disable=E0611 +from nose.tools import assert_true, assert_in, assert_equal # pylint: disable=no-name-in-module DISPLAY_NAME = "Display Name" diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index 4cd814acd8..743f54f829 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -2,7 +2,7 @@ # pylint: disable=missing-docstring from lettuce import world -from nose.tools import assert_equal, assert_in # pylint: disable=E0611 +from nose.tools import assert_equal, assert_in # pylint: disable=no-name-in-module from terrain.steps import reload_the_page from common import type_in_codemirror from selenium.webdriver.common.keys import Keys diff --git a/cms/djangoapps/contentstore/features/course-outline.py b/cms/djangoapps/contentstore/features/course-outline.py index 141aaa1724..17c71b85e5 100644 --- a/cms/djangoapps/contentstore/features/course-outline.py +++ b/cms/djangoapps/contentstore/features/course-outline.py @@ -3,7 +3,7 @@ from lettuce import world, step from common import * -from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=E0611 +from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=no-name-in-module from logging import getLogger logger = getLogger(__name__) diff --git a/cms/djangoapps/contentstore/features/course-settings.py b/cms/djangoapps/contentstore/features/course-settings.py index bc307e5072..c2aaae4989 100644 --- a/cms/djangoapps/contentstore/features/course-settings.py +++ b/cms/djangoapps/contentstore/features/course-settings.py @@ -7,7 +7,7 @@ from selenium.webdriver.common.keys import Keys from common import type_in_codemirror, upload_file from django.conf import settings -from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=E0611 +from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=no-name-in-module TEST_ROOT = settings.COMMON_TEST_DATA_ROOT diff --git a/cms/djangoapps/contentstore/features/course-team.py b/cms/djangoapps/contentstore/features/course-team.py index 855a6d143a..130f05b0f5 100644 --- a/cms/djangoapps/contentstore/features/course-team.py +++ b/cms/djangoapps/contentstore/features/course-team.py @@ -2,7 +2,7 @@ # pylint: disable=redefined-outer-name from lettuce import world, step -from nose.tools import assert_in # pylint: disable=E0611 +from nose.tools import assert_in # pylint: disable=no-name-in-module @step(u'(I am viewing|s?he views) the course team settings$') diff --git a/cms/djangoapps/contentstore/features/course-updates.py b/cms/djangoapps/contentstore/features/course-updates.py index 6285c61678..6a39a29fee 100644 --- a/cms/djangoapps/contentstore/features/course-updates.py +++ b/cms/djangoapps/contentstore/features/course-updates.py @@ -4,7 +4,7 @@ from lettuce import world, step from selenium.webdriver.common.keys import Keys from common import type_in_codemirror, get_codemirror_value -from nose.tools import assert_in # pylint: disable=E0611 +from nose.tools import assert_in # pylint: disable=no-name-in-module @step(u'I go to the course updates page') diff --git a/cms/djangoapps/contentstore/features/grading.py b/cms/djangoapps/contentstore/features/grading.py index e10fb39a4f..10ea72b794 100644 --- a/cms/djangoapps/contentstore/features/grading.py +++ b/cms/djangoapps/contentstore/features/grading.py @@ -7,7 +7,7 @@ from terrain.steps import reload_the_page from selenium.common.exceptions import InvalidElementStateException from opaque_keys.edx.locations import SlashSeparatedCourseKey from contentstore.utils import reverse_course_url -from nose.tools import assert_in, assert_not_in, assert_equal, assert_not_equal # pylint: disable=E0611 +from nose.tools import assert_in, assert_not_in, assert_equal, assert_not_equal # pylint: disable=no-name-in-module @step(u'I am viewing the grading settings') diff --git a/cms/djangoapps/contentstore/features/pages.py b/cms/djangoapps/contentstore/features/pages.py index 36d3a85df1..0c6c89844d 100644 --- a/cms/djangoapps/contentstore/features/pages.py +++ b/cms/djangoapps/contentstore/features/pages.py @@ -3,7 +3,7 @@ # pylint: disable=W0613 from lettuce import world, step -from nose.tools import assert_equal, assert_in # pylint: disable=E0611 +from nose.tools import assert_equal, assert_in # pylint: disable=no-name-in-module CSS_FOR_TAB_ELEMENT = "li[data-tab-id='{0}'] input.toggle-checkbox" diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py index c7b3dd3069..a1135d06c7 100644 --- a/cms/djangoapps/contentstore/features/problem-editor.py +++ b/cms/djangoapps/contentstore/features/problem-editor.py @@ -3,7 +3,7 @@ import json from lettuce import world, step -from nose.tools import assert_equal, assert_true # pylint: disable=E0611 +from nose.tools import assert_equal, assert_true # pylint: disable=no-name-in-module from common import type_in_codemirror, open_new_course from advanced_settings import change_value, ADVANCED_MODULES_KEY from course_import import import_file diff --git a/cms/djangoapps/contentstore/features/upload.py b/cms/djangoapps/contentstore/features/upload.py index bd483ca3a7..5ae85ddb19 100644 --- a/cms/djangoapps/contentstore/features/upload.py +++ b/cms/djangoapps/contentstore/features/upload.py @@ -10,7 +10,7 @@ import random import os from django.contrib.auth.models import User from student.models import CourseEnrollment -from nose.tools import assert_equal, assert_not_equal # pylint: disable=E0611 +from nose.tools import assert_equal, assert_not_equal # pylint: disable=no-name-in-module TEST_ROOT = settings.COMMON_TEST_DATA_ROOT ASSET_NAMES_CSS = 'td.name-col > span.title > a.filename' diff --git a/cms/djangoapps/contentstore/features/video_editor.py b/cms/djangoapps/contentstore/features/video_editor.py index 687f65e898..8cac89b598 100644 --- a/cms/djangoapps/contentstore/features/video_editor.py +++ b/cms/djangoapps/contentstore/features/video_editor.py @@ -4,7 +4,7 @@ import requests from lettuce import world, step -from nose.tools import assert_true, assert_equal, assert_in, assert_not_equal # pylint: disable=E0611 +from nose.tools import assert_true, assert_equal, assert_in, assert_not_equal # pylint: disable=no-name-in-module from terrain.steps import reload_the_page from django.conf import settings from common import upload_file, attach_file diff --git a/cms/djangoapps/contentstore/features/video_handout.py b/cms/djangoapps/contentstore/features/video_handout.py index 9f3aa2c090..ccf74680d7 100644 --- a/cms/djangoapps/contentstore/features/video_handout.py +++ b/cms/djangoapps/contentstore/features/video_handout.py @@ -3,7 +3,7 @@ # pylint: disable=missing-docstring from lettuce import world, step -from nose.tools import assert_true # pylint: disable=E0611 +from nose.tools import assert_true # pylint: disable=no-name-in-module from video_editor import RequestHandlerWithSessionId, success_upload_file diff --git a/common/djangoapps/static_replace/test/test_static_replace.py b/common/djangoapps/static_replace/test/test_static_replace.py index 7dc3d7f3cb..b74965277f 100644 --- a/common/djangoapps/static_replace/test/test_static_replace.py +++ b/common/djangoapps/static_replace/test/test_static_replace.py @@ -1,6 +1,6 @@ import re -from nose.tools import assert_equals, assert_true, assert_false # pylint: disable=E0611 +from nose.tools import assert_equals, assert_true, assert_false # pylint: disable=no-name-in-module from static_replace import (replace_static_urls, replace_course_urls, _url_replace_regex) from mock import patch, Mock diff --git a/common/djangoapps/terrain/steps.py b/common/djangoapps/terrain/steps.py index 0a5db23754..f8b6daef34 100644 --- a/common/djangoapps/terrain/steps.py +++ b/common/djangoapps/terrain/steps.py @@ -19,7 +19,7 @@ import lettuce.django from lettuce import world, step from .course_helpers import * from .ui_helpers import * -from nose.tools import assert_equals # pylint: disable=E0611 +from nose.tools import assert_equals # pylint: disable=no-name-in-module from opaque_keys.edx.locations import SlashSeparatedCourseKey diff --git a/common/djangoapps/util/tests/test_date_utils.py b/common/djangoapps/util/tests/test_date_utils.py index 0bf52b8ac6..579c476c04 100644 --- a/common/djangoapps/util/tests/test_date_utils.py +++ b/common/djangoapps/util/tests/test_date_utils.py @@ -8,7 +8,7 @@ import unittest import ddt from mock import patch -from nose.tools import assert_equals, assert_false # pylint: disable=E0611 +from nose.tools import assert_equals, assert_false # pylint: disable=no-name-in-module from pytz import UTC from util.date_utils import ( diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py index 0b428ca333..ebc6892729 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py @@ -1,4 +1,4 @@ -from nose.tools import assert_equals, assert_true, assert_false # pylint: disable=E0611 +from nose.tools import assert_equals, assert_true, assert_false # pylint: disable=no-name-in-module def check_has_course_method(modulestore, locator, locator_key_fields): diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py index ab2afc1bc8..6fbe8747e2 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py @@ -1,6 +1,6 @@ # pylint: disable=E1101 # pylint: disable=W0212 -# pylint: disable=E0611 +# pylint: disable=no-name-in-module from nose.tools import assert_equals, assert_raises, \ assert_not_equals, assert_false, assert_true, assert_greater, assert_is_instance, assert_is_none # pylint: enable=E0611 diff --git a/common/lib/xmodule/xmodule/tests/test_stringify.py b/common/lib/xmodule/xmodule/tests/test_stringify.py index 10abaf72f5..8bdf59f5ba 100644 --- a/common/lib/xmodule/xmodule/tests/test_stringify.py +++ b/common/lib/xmodule/xmodule/tests/test_stringify.py @@ -1,4 +1,4 @@ -from nose.tools import assert_equals # pylint: disable=E0611 +from nose.tools import assert_equals # pylint: disable=no-name-in-module from lxml import etree from xmodule.stringify import stringify_children diff --git a/common/lib/xmodule/xmodule/tests/test_xml_module.py b/common/lib/xmodule/xmodule/tests/test_xml_module.py index 36d22c0fba..1d85d428b0 100644 --- a/common/lib/xmodule/xmodule/tests/test_xml_module.py +++ b/common/lib/xmodule/xmodule/tests/test_xml_module.py @@ -4,7 +4,7 @@ import unittest from mock import Mock -from nose.tools import assert_equals, assert_not_equals, assert_true, assert_false, assert_in, assert_not_in # pylint: disable=E0611 +from nose.tools import assert_equals, assert_not_equals, assert_true, assert_false, assert_in, assert_not_in # pylint: disable=no-name-in-module from xblock.field_data import DictFieldData from xblock.fields import Scope, String, Dict, Boolean, Integer, Float, Any, List diff --git a/lms/djangoapps/courseware/features/homepage.py b/lms/djangoapps/courseware/features/homepage.py index 37858a132b..d10ec77f25 100644 --- a/lms/djangoapps/courseware/features/homepage.py +++ b/lms/djangoapps/courseware/features/homepage.py @@ -2,7 +2,7 @@ # pylint: disable=redefined-outer-name from lettuce import world, step -from nose.tools import assert_equals, assert_greater # pylint: disable=E0611 +from nose.tools import assert_equals, assert_greater # pylint: disable=no-name-in-module @step(u'I should see the following links and ids') diff --git a/lms/djangoapps/courseware/features/openended.py b/lms/djangoapps/courseware/features/openended.py index 9b48aed195..2b517c40fe 100644 --- a/lms/djangoapps/courseware/features/openended.py +++ b/lms/djangoapps/courseware/features/openended.py @@ -3,7 +3,7 @@ from lettuce import world, step from lettuce.django import django_url -from nose.tools import assert_equals, assert_in # pylint: disable=E0611 +from nose.tools import assert_equals, assert_in # pylint: disable=no-name-in-module from logging import getLogger logger = getLogger(__name__) diff --git a/lms/djangoapps/django_comment_client/base/tests.py b/lms/djangoapps/django_comment_client/base/tests.py index 67b1eb91a4..3595eef348 100644 --- a/lms/djangoapps/django_comment_client/base/tests.py +++ b/lms/djangoapps/django_comment_client/base/tests.py @@ -7,7 +7,7 @@ from django.contrib.auth.models import User from django.core.management import call_command from django.core.urlresolvers import reverse from mock import patch, ANY, Mock -from nose.tools import assert_true, assert_equal # pylint: disable=E0611 +from nose.tools import assert_true, assert_equal # pylint: disable=no-name-in-module from opaque_keys.edx.locations import SlashSeparatedCourseKey from courseware.tests.modulestore_config import TEST_DATA_MONGO_MODULESTORE diff --git a/lms/djangoapps/django_comment_client/forum/tests.py b/lms/djangoapps/django_comment_client/forum/tests.py index c435b2dc86..9a2d3b54c0 100644 --- a/lms/djangoapps/django_comment_client/forum/tests.py +++ b/lms/djangoapps/django_comment_client/forum/tests.py @@ -21,7 +21,7 @@ from django_comment_client.utils import strip_none from courseware.tests.modulestore_config import TEST_DATA_DIR from courseware.courses import UserNotEnrolled -from nose.tools import assert_true # pylint: disable=E0611 +from nose.tools import assert_true # pylint: disable=no-name-in-module from mock import patch, Mock, ANY, call from course_groups.models import CourseUserGroup diff --git a/lms/djangoapps/instructor/features/bulk_email.py b/lms/djangoapps/instructor/features/bulk_email.py index 654de88ded..415a26c102 100644 --- a/lms/djangoapps/instructor/features/bulk_email.py +++ b/lms/djangoapps/instructor/features/bulk_email.py @@ -7,7 +7,7 @@ Define steps for bulk email acceptance test. from lettuce import world, step from lettuce.django import mail -from nose.tools import assert_in, assert_equal # pylint: disable=E0611 +from nose.tools import assert_in, assert_equal # pylint: disable=no-name-in-module from django.core.management import call_command from django.conf import settings diff --git a/lms/djangoapps/instructor/features/common.py b/lms/djangoapps/instructor/features/common.py index c3736b49dd..92402d3842 100644 --- a/lms/djangoapps/instructor/features/common.py +++ b/lms/djangoapps/instructor/features/common.py @@ -9,7 +9,7 @@ from __future__ import absolute_import from lettuce import world, step from mock import patch -from nose.tools import assert_in # pylint: disable=E0611 +from nose.tools import assert_in # pylint: disable=no-name-in-module from courseware.tests.factories import StaffFactory, InstructorFactory diff --git a/lms/djangoapps/instructor/features/data_download.py b/lms/djangoapps/instructor/features/data_download.py index 4a072b78fe..a8734621c6 100644 --- a/lms/djangoapps/instructor/features/data_download.py +++ b/lms/djangoapps/instructor/features/data_download.py @@ -7,7 +7,7 @@ acceptance tests. # pylint: disable=redefined-outer-name from lettuce import world, step -from nose.tools import assert_in, assert_regexp_matches # pylint: disable=E0611 +from nose.tools import assert_in, assert_regexp_matches # pylint: disable=no-name-in-module from terrain.steps import reload_the_page from django.utils import http diff --git a/lms/djangoapps/licenses/tests.py b/lms/djangoapps/licenses/tests.py index c3bb8ca7a3..ef99ff501b 100644 --- a/lms/djangoapps/licenses/tests.py +++ b/lms/djangoapps/licenses/tests.py @@ -13,7 +13,7 @@ from django.test.client import Client from django.test.utils import override_settings from django.core.management import call_command from django.core.urlresolvers import reverse -from nose.tools import assert_true # pylint: disable=E0611 +from nose.tools import assert_true # pylint: disable=no-name-in-module from courseware.tests.modulestore_config import TEST_DATA_MONGO_MODULESTORE from licenses.models import CourseSoftware, UserLicense From b127d2844bd48467b9824ee49c70c7cafd0aa392 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sat, 29 Nov 2014 23:10:34 -0500 Subject: [PATCH 04/39] s/pylint: disable=C0103/pylint: disable=invalid-name/ --- cms/urls.py | 2 +- common/djangoapps/external_auth/tests/test_helper.py | 10 +++++----- common/djangoapps/external_auth/tests/test_shib.py | 6 +++--- common/djangoapps/student/tests/test_login.py | 10 +++++----- common/djangoapps/student/views.py | 2 +- common/djangoapps/terrain/stubs/youtube.py | 2 +- common/lib/capa/capa/inputtypes.py | 2 +- common/lib/capa/capa/responsetypes.py | 2 +- common/lib/xmodule/xmodule/modulestore/mongo/base.py | 2 +- common/lib/xmodule/xmodule/tests/test_capa_module.py | 2 +- docs/en_us/developers/source/conf.py | 2 +- docs/en_us/platform_api/source/conf.py | 2 +- lms/djangoapps/course_wiki/tests/test_access.py | 2 +- .../django_comment_client/tests/test_utils.py | 4 ++-- lms/djangoapps/instructor/tests/test_api.py | 4 ++-- lms/djangoapps/shoppingcart/models.py | 2 +- lms/djangoapps/verify_student/models.py | 2 +- lms/djangoapps/verify_student/views.py | 2 +- lms/envs/common.py | 2 +- 19 files changed, 31 insertions(+), 31 deletions(-) diff --git a/cms/urls.py b/cms/urls.py index 6548044b96..afdec0eec8 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -148,7 +148,7 @@ if settings.DEBUG: pass # Custom error pages -# pylint: disable=C0103 +# pylint: disable=invalid-name handler404 = 'contentstore.views.render_404' handler500 = 'contentstore.views.render_500' diff --git a/common/djangoapps/external_auth/tests/test_helper.py b/common/djangoapps/external_auth/tests/test_helper.py index ff463e3355..b7cacae207 100644 --- a/common/djangoapps/external_auth/tests/test_helper.py +++ b/common/djangoapps/external_auth/tests/test_helper.py @@ -13,11 +13,11 @@ class ExternalAuthHelperFnTest(TestCase): """ Tests the _safe_postlogin_redirect function with different values of next """ - HOST = 'testserver' # pylint: disable=C0103 - ONSITE1 = '/dashboard' # pylint: disable=C0103 - ONSITE2 = '/courses/org/num/name/courseware' # pylint: disable=C0103 - ONSITE3 = 'http://{}/my/custom/url'.format(HOST) # pylint: disable=C0103 - OFFSITE1 = 'http://www.attacker.com' # pylint: disable=C0103 + HOST = 'testserver' # pylint: disable=invalid-name + ONSITE1 = '/dashboard' # pylint: disable=invalid-name + ONSITE2 = '/courses/org/num/name/courseware' # pylint: disable=invalid-name + ONSITE3 = 'http://{}/my/custom/url'.format(HOST) # pylint: disable=invalid-name + OFFSITE1 = 'http://www.attacker.com' # pylint: disable=invalid-name for redirect_to in [ONSITE1, ONSITE2, ONSITE3]: redir = _safe_postlogin_redirect(redirect_to, HOST) diff --git a/common/djangoapps/external_auth/tests/test_shib.py b/common/djangoapps/external_auth/tests/test_shib.py index fa09501e41..ac2f49c3d2 100644 --- a/common/djangoapps/external_auth/tests/test_shib.py +++ b/common/djangoapps/external_auth/tests/test_shib.py @@ -582,9 +582,9 @@ class ShibUtilFnTest(TestCase): Tests util functions in shib module """ def test__flatten_to_ascii(self): - DIACRITIC = u"àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=C0103 - STR_DIACRI = "àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=C0103 - FLATTENED = u"aeiouAEIOUaeiouyAEIOUYaeiouAEIOUanoANOaeiouyAEIOUYaAcC" # pylint: disable=C0103 + DIACRITIC = u"àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=invalid-name + STR_DIACRI = "àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=invalid-name + FLATTENED = u"aeiouAEIOUaeiouyAEIOUYaeiouAEIOUanoANOaeiouyAEIOUYaAcC" # pylint: disable=invalid-name self.assertEqual(_flatten_to_ascii('jasön'), 'jason') # umlaut self.assertEqual(_flatten_to_ascii('Jason包'), 'Jason') # mandarin, so it just gets dropped self.assertEqual(_flatten_to_ascii('abc'), 'abc') # pass through diff --git a/common/djangoapps/student/tests/test_login.py b/common/djangoapps/student/tests/test_login.py index eb3183a4a6..5b51587362 100644 --- a/common/djangoapps/student/tests/test_login.py +++ b/common/djangoapps/student/tests/test_login.py @@ -335,9 +335,9 @@ class UtilFnTest(TestCase): """ Tests the _parse_course_id_from_string util function """ - COURSE_ID = u'org/num/run' # pylint: disable=C0103 - COURSE_URL = u'/courses/{}/otherstuff'.format(COURSE_ID) # pylint: disable=C0103 - NON_COURSE_URL = u'/blahblah' # pylint: disable=C0103 + COURSE_ID = u'org/num/run' # pylint: disable=invalid-name + COURSE_URL = u'/courses/{}/otherstuff'.format(COURSE_ID) # pylint: disable=invalid-name + NON_COURSE_URL = u'/blahblah' # pylint: disable=invalid-name self.assertEqual( _parse_course_id_from_string(COURSE_URL), SlashSeparatedCourseKey.from_deprecated_string(COURSE_ID) @@ -415,7 +415,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase): Tests the redirects when visiting course-specific URL with @login_required. Should vary by course depending on its enrollment_domain """ - TARGET_URL = reverse('courseware', args=[self.course.id.to_deprecated_string()]) # pylint: disable=C0103 + TARGET_URL = reverse('courseware', args=[self.course.id.to_deprecated_string()]) # pylint: disable=invalid-name noshib_response = self.client.get(TARGET_URL, follow=True) self.assertEqual(noshib_response.redirect_chain[-1], ('http://testserver/accounts/login?next={url}'.format(url=TARGET_URL), 302)) @@ -423,7 +423,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase): .format(platform_name=settings.PLATFORM_NAME))) self.assertEqual(noshib_response.status_code, 200) - TARGET_URL_SHIB = reverse('courseware', args=[self.shib_course.id.to_deprecated_string()]) # pylint: disable=C0103 + TARGET_URL_SHIB = reverse('courseware', args=[self.shib_course.id.to_deprecated_string()]) # pylint: disable=invalid-name shib_response = self.client.get(**{'path': TARGET_URL_SHIB, 'follow': True, 'REMOTE_USER': self.extauth.external_id, diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 9429502cae..f48651f5d3 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -110,7 +110,7 @@ from eventtracking import tracker log = logging.getLogger("edx.student") AUDIT_LOG = logging.getLogger("audit") -ReverifyInfo = namedtuple('ReverifyInfo', 'course_id course_name course_number date status display') # pylint: disable=C0103 +ReverifyInfo = namedtuple('ReverifyInfo', 'course_id course_name course_number date status display') # pylint: disable=invalid-name def csrf_token(context): diff --git a/common/djangoapps/terrain/stubs/youtube.py b/common/djangoapps/terrain/stubs/youtube.py index 823b78fd02..2bf8d7dcf6 100644 --- a/common/djangoapps/terrain/stubs/youtube.py +++ b/common/djangoapps/terrain/stubs/youtube.py @@ -35,7 +35,7 @@ class StubYouTubeHandler(StubHttpRequestHandler): # Default number of seconds to delay the response to simulate network latency. DEFAULT_DELAY_SEC = 0.5 - def do_DELETE(self): # pylint: disable=C0103 + def do_DELETE(self): # pylint: disable=invalid-name """ Allow callers to delete all the server configurations using the /del_config URL. """ diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index f54a02ca03..9b7d3af9c9 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -63,7 +63,7 @@ log = logging.getLogger(__name__) ######################################################################### -registry = TagRegistry() # pylint: disable=C0103 +registry = TagRegistry() # pylint: disable=invalid-name class Status(object): diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 87137039ea..1caa9f07e4 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -55,7 +55,7 @@ log = logging.getLogger(__name__) registry = TagRegistry() -CorrectMap = correctmap.CorrectMap # pylint: disable=C0103 +CorrectMap = correctmap.CorrectMap # pylint: disable=invalid-name CORRECTMAP_PY = None diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/base.py b/common/lib/xmodule/xmodule/modulestore/mongo/base.py index dfd63fbc24..9865491599 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/base.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/base.py @@ -441,7 +441,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo DEFAULT_ASSET_COLLECTION_NAME = 'assetstore' # TODO (cpennington): Enable non-filesystem filestores - # pylint: disable=C0103 + # pylint: disable=invalid-name # pylint: disable=W0201 def __init__(self, contentstore, doc_store_config, fs_root, render_template, default_class=None, diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index eb7a01864d..114bbe7191 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -4,7 +4,7 @@ Tests of the Capa XModule """ # pylint: disable=missing-docstring # pylint: disable=R0904 -# pylint: disable=C0103 +# pylint: disable=invalid-name # pylint: disable=C0302 import datetime diff --git a/docs/en_us/developers/source/conf.py b/docs/en_us/developers/source/conf.py index ebe923d233..37e26e20a9 100644 --- a/docs/en_us/developers/source/conf.py +++ b/docs/en_us/developers/source/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# pylint: disable=C0103 +# pylint: disable=invalid-name # pylint: disable=W0622 # pylint: disable=W0212 # pylint: disable=W0613 diff --git a/docs/en_us/platform_api/source/conf.py b/docs/en_us/platform_api/source/conf.py index 9f24a19ae1..52d901bde8 100644 --- a/docs/en_us/platform_api/source/conf.py +++ b/docs/en_us/platform_api/source/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# pylint: disable=C0103 +# pylint: disable=invalid-name # pylint: disable=W0622 # pylint: disable=W0212 # pylint: disable=W0613 diff --git a/lms/djangoapps/course_wiki/tests/test_access.py b/lms/djangoapps/course_wiki/tests/test_access.py index c4bf9e5091..04cbe0e62c 100644 --- a/lms/djangoapps/course_wiki/tests/test_access.py +++ b/lms/djangoapps/course_wiki/tests/test_access.py @@ -141,7 +141,7 @@ class TestWikiAccessForNumericalCourseNumber(TestWikiAccessBase): wiki_200_page_page = self.create_urlpath(wiki_200_page, 'Grandchild') self.wiki_200_pages = [wiki_200, wiki_200_page, wiki_200_page_page] - def test_course_staff_is_course_wiki_staff_for_numerical_course_number(self): # pylint: disable=C0103 + def test_course_staff_is_course_wiki_staff_for_numerical_course_number(self): # pylint: disable=invalid-name for page in self.wiki_200_pages: for course_staff in self.course_200_staff: self.assertTrue(user_is_article_course_staff(course_staff, page.article)) diff --git a/lms/djangoapps/django_comment_client/tests/test_utils.py b/lms/djangoapps/django_comment_client/tests/test_utils.py index 9fd36cfae5..a6c9fc5861 100644 --- a/lms/djangoapps/django_comment_client/tests/test_utils.py +++ b/lms/djangoapps/django_comment_client/tests/test_utils.py @@ -113,7 +113,7 @@ class CoursewareContextTestCase(ModuleStoreTestCase): ] utils.add_courseware_context(threads, self.course) - def assertThreadCorrect(thread, discussion, expected_title): # pylint: disable=C0103 + def assertThreadCorrect(thread, discussion, expected_title): # pylint: disable=invalid-name self.assertEqual( set(thread.keys()), set(["commentable_id", "courseware_url", "courseware_title"]) @@ -148,7 +148,7 @@ class CategoryMapTestCase(ModuleStoreTestCase): self.course.discussion_topics = {} self.course.save() self.discussion_num = 0 - self.maxDiff = None # pylint: disable=C0103 + self.maxDiff = None # pylint: disable=invalid-name def create_discussion(self, discussion_category, discussion_target, **kwargs): self.discussion_num += 1 diff --git a/lms/djangoapps/instructor/tests/test_api.py b/lms/djangoapps/instructor/tests/test_api.py index 1ca5bba6ac..65fca3c5ae 100644 --- a/lms/djangoapps/instructor/tests/test_api.py +++ b/lms/djangoapps/instructor/tests/test_api.py @@ -569,7 +569,7 @@ class TestInstructorAPIEnrollment(ModuleStoreTestCase, LoginEnrollmentTestCase): # uncomment to enable enable printing of large diffs # from failed assertions in the event of a test failure. - # (comment because pylint C0103) + # (comment because pylint C0103(invalid-name)) # self.maxDiff = None def tearDown(self): @@ -1119,7 +1119,7 @@ class TestInstructorAPIBulkBetaEnrollment(ModuleStoreTestCase, LoginEnrollmentTe # uncomment to enable enable printing of large diffs # from failed assertions in the event of a test failure. - # (comment because pylint C0103) + # (comment because pylint C0103(invalid-name)) # self.maxDiff = None def test_missing_params(self): diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index 360bcb8a25..e3c22e63b6 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -65,7 +65,7 @@ ORDER_STATUSES = ( ) # we need a tuple to represent the primary key of various OrderItem subclasses -OrderItemSubclassPK = namedtuple('OrderItemSubclassPK', ['cls', 'pk']) # pylint: disable=C0103 +OrderItemSubclassPK = namedtuple('OrderItemSubclassPK', ['cls', 'pk']) # pylint: disable=invalid-name class OrderTypes(object): diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index f7c2a2b17d..81b2085e52 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -38,7 +38,7 @@ from reverification.models import MidcourseReverificationWindow log = logging.getLogger(__name__) -def generateUUID(): # pylint: disable=C0103 +def generateUUID(): # pylint: disable=invalid-name """ Utility function; generates UUIDs """ return str(uuid.uuid4()) diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index e181687edd..b59d425153 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -535,7 +535,7 @@ def reverification_submission_confirmation(_request): @login_required -def midcourse_reverification_confirmation(_request): # pylint: disable=C0103 +def midcourse_reverification_confirmation(_request): # pylint: disable=invalid-name """ Shows the user a confirmation page if the submission to SoftwareSecure was successful """ diff --git a/lms/envs/common.py b/lms/envs/common.py index 8e167c0074..850809dc64 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -22,7 +22,7 @@ Longer TODO: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0611, W0614, C0103 +# pylint: disable=W0401, W0611, W0614, invalid-name import sys import os From 134effa840d2c62e023486ae8a16114fd60a33b6 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sat, 29 Nov 2014 23:11:56 -0500 Subject: [PATCH 05/39] Remove outdated pylint disable --- cms/djangoapps/contentstore/utils.py | 2 +- common/lib/xmodule/xmodule/tests/test_capa_module.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 2f61345f9a..4511f62abe 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -1,4 +1,4 @@ -# pylint: disable=E1103, E1101 +# pylint: disable=E1101 import copy import logging diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index 114bbe7191..4d117c69e9 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -3,9 +3,7 @@ Tests of the Capa XModule """ # pylint: disable=missing-docstring -# pylint: disable=R0904 # pylint: disable=invalid-name -# pylint: disable=C0302 import datetime import json From 19f1dacab276c3561f48148126f86f1efac6501a Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 00:04:59 -0500 Subject: [PATCH 06/39] s/pylint: disable=E1101/pylint: disable=no-member/ --- .../contentstore/tests/test_contentstore.py | 1 - .../contentstore/tests/test_import.py | 2 +- cms/djangoapps/contentstore/tests/utils.py | 2 +- cms/djangoapps/contentstore/utils.py | 2 +- .../tests/test_transfer_students.py | 4 +- common/djangoapps/terrain/browser.py | 2 +- common/djangoapps/terrain/setup_prereqs.py | 10 ++-- .../util/password_policy_validators.py | 2 +- .../xmodule/modulestore/tests/test_mongo.py | 2 +- common/lib/xmodule/xmodule/studio_editable.py | 6 +-- .../xmodule/video_module/video_handlers.py | 2 +- .../bulk_email/tests/test_err_handling.py | 32 ++++++------- lms/djangoapps/bulk_email/tests/test_tasks.py | 4 +- lms/djangoapps/course_wiki/views.py | 2 +- .../courseware/tests/test_model_data.py | 2 +- .../instructor/features/bulk_email.py | 8 ++-- .../instructor/tests/test_ecommerce.py | 2 +- lms/djangoapps/instructor/views/api.py | 2 +- lms/djangoapps/instructor/views/legacy.py | 2 +- lms/djangoapps/instructor_task/api_helper.py | 2 +- lms/djangoapps/instructor_task/subtasks.py | 2 +- .../instructor_task/tests/test_api.py | 4 +- lms/djangoapps/mobile_api/users/tests.py | 4 +- lms/djangoapps/shoppingcart/models.py | 46 +++++++++---------- .../shoppingcart/tests/test_views.py | 14 +++--- 25 files changed, 80 insertions(+), 81 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index 6834132159..9bde0a6672 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -# pylint: disable=E1101 # pylint: disable=W0212 import copy diff --git a/cms/djangoapps/contentstore/tests/test_import.py b/cms/djangoapps/contentstore/tests/test_import.py index fe81ce05ea..daf48cea87 100644 --- a/cms/djangoapps/contentstore/tests/test_import.py +++ b/cms/djangoapps/contentstore/tests/test_import.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# pylint: disable=E1101 +# pylint: disable=no-member # pylint: disable=protected-access """ Tests for import_from_xml using the mongo modulestore. diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index 2d878cd4bc..439eccad98 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -1,4 +1,4 @@ -# pylint: disable=E1101 +# pylint: disable=no-member ''' Utilities for contentstore tests ''' diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 4511f62abe..b5a8c525f2 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -1,4 +1,4 @@ -# pylint: disable=E1101 +# pylint: disable=no-member import copy import logging diff --git a/common/djangoapps/student/management/tests/test_transfer_students.py b/common/djangoapps/student/management/tests/test_transfer_students.py index 45376eb148..f9847c037d 100644 --- a/common/djangoapps/student/management/tests/test_transfer_students.py +++ b/common/djangoapps/student/management/tests/test_transfer_students.py @@ -45,8 +45,8 @@ class TestTransferStudents(ModuleStoreTestCase): def test_transfer_students(self): """ Verify the transfer student command works as intended. """ student = UserFactory.create() - student.set_password(self.PASSWORD) # pylint: disable=E1101 - student.save() # pylint: disable=E1101 + student.set_password(self.PASSWORD) # pylint: disable=no-member + student.save() # pylint: disable=no-member mode = 'verified' # Original Course original_course_location = locator.CourseLocator('Org0', 'Course0', 'Run0') diff --git a/common/djangoapps/terrain/browser.py b/common/djangoapps/terrain/browser.py index 75ad8aa984..8e74ccd5a1 100644 --- a/common/djangoapps/terrain/browser.py +++ b/common/djangoapps/terrain/browser.py @@ -2,7 +2,7 @@ Browser set up for acceptance tests. """ -# pylint: disable=E1101 +# pylint: disable=no-member # pylint: disable=W0613 from lettuce import before, after, world diff --git a/common/djangoapps/terrain/setup_prereqs.py b/common/djangoapps/terrain/setup_prereqs.py index c39b1cb9a7..98f5c67983 100644 --- a/common/djangoapps/terrain/setup_prereqs.py +++ b/common/djangoapps/terrain/setup_prereqs.py @@ -36,7 +36,7 @@ YOUTUBE_API_URLS = { } -@before.all # pylint: disable=E1101 +@before.all # pylint: disable=no-member def start_video_server(): """ Serve the HTML5 Video Sources from a local port @@ -47,7 +47,7 @@ def start_video_server(): setattr(world, 'video_source', video_server) -@after.all # pylint: disable=E1101 +@after.all # pylint: disable=no-member def stop_video_server(_total): """ Stop the HTML5 Video Source server after all tests have executed @@ -57,7 +57,7 @@ def stop_video_server(_total): video_server.shutdown() -@before.each_scenario # pylint: disable=E1101 +@before.each_scenario # pylint: disable=no-member def process_requires_tags(scenario): """ Process the scenario tags to make sure that any @@ -125,7 +125,7 @@ def is_youtube_available(urls): return True -@after.each_scenario # pylint: disable=E1101 +@after.each_scenario # pylint: disable=no-member def stop_stubs(_scenario): """ Shut down any stub services that were started up for the scenario. @@ -136,7 +136,7 @@ def stop_stubs(_scenario): stub_server.shutdown() -@after.each_scenario # pylint: disable=E1101 +@after.each_scenario # pylint: disable=no-member def clear_alerts(_scenario): """ Clear any alerts that might still exist, so that diff --git a/common/djangoapps/util/password_policy_validators.py b/common/djangoapps/util/password_policy_validators.py index 987ec30a02..c3c94d33e8 100644 --- a/common/djangoapps/util/password_policy_validators.py +++ b/common/djangoapps/util/password_policy_validators.py @@ -1,4 +1,4 @@ -# pylint: disable=E1101 +# pylint: disable=no-member """ This file exposes a number of password complexity validators which can be optionally added to account creation diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py index 6fbe8747e2..9da34dbb5d 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py @@ -1,4 +1,4 @@ -# pylint: disable=E1101 +# pylint: disable=no-member # pylint: disable=W0212 # pylint: disable=no-name-in-module from nose.tools import assert_equals, assert_raises, \ diff --git a/common/lib/xmodule/xmodule/studio_editable.py b/common/lib/xmodule/xmodule/studio_editable.py index da29b19c6a..5b173ecbab 100644 --- a/common/lib/xmodule/xmodule/studio_editable.py +++ b/common/lib/xmodule/xmodule/studio_editable.py @@ -19,10 +19,10 @@ class StudioEditableModule(object): """ contents = [] - for child in self.descriptor.get_children(): # pylint: disable=E1101 + for child in self.descriptor.get_children(): # pylint: disable=no-member if can_reorder: context['reorderable_items'].add(child.location) - child_module = self.system.get_module(child) # pylint: disable=E1101 + child_module = self.system.get_module(child) # pylint: disable=no-member rendered_child = child_module.render(StudioEditableModule.get_preview_view_name(child_module), context) fragment.add_frag_resources(rendered_child) @@ -31,7 +31,7 @@ class StudioEditableModule(object): 'content': rendered_child.content }) - fragment.add_content(self.system.render_template("studio_render_children_view.html", { # pylint: disable=E1101 + fragment.add_content(self.system.render_template("studio_render_children_view.html", { # pylint: disable=no-member 'items': contents, 'xblock_context': context, 'can_add': can_add, diff --git a/common/lib/xmodule/xmodule/video_module/video_handlers.py b/common/lib/xmodule/xmodule/video_module/video_handlers.py index 27e81a3ad9..8ee66581ae 100644 --- a/common/lib/xmodule/xmodule/video_module/video_handlers.py +++ b/common/lib/xmodule/xmodule/video_module/video_handlers.py @@ -30,7 +30,7 @@ log = logging.getLogger(__name__) # Disable no-member warning: -# pylint: disable=E1101 +# pylint: disable=no-member class VideoStudentViewHandlers(object): diff --git a/lms/djangoapps/bulk_email/tests/test_err_handling.py b/lms/djangoapps/bulk_email/tests/test_err_handling.py index 8dd68cf252..6734fbc9d5 100644 --- a/lms/djangoapps/bulk_email/tests/test_err_handling.py +++ b/lms/djangoapps/bulk_email/tests/test_err_handling.py @@ -173,7 +173,7 @@ class TestEmailErrors(ModuleStoreTestCase): entry = InstructorTask.create(course_id, "task_type", "task_key", "task_input", self.instructor) task_input = {"email_id": -1} with self.assertRaises(CourseEmail.DoesNotExist): - perform_delegate_email_batches(entry.id, course_id, task_input, "action_name") # pylint: disable=E1101 + perform_delegate_email_batches(entry.id, course_id, task_input, "action_name") # pylint: disable=no-member ((log_str, __, email_id), __) = mock_log.warning.call_args self.assertTrue(mock_log.warning.called) self.assertIn('Failed to get CourseEmail with id', log_str) @@ -188,10 +188,10 @@ class TestEmailErrors(ModuleStoreTestCase): email = CourseEmail(course_id=course_id) email.save() entry = InstructorTask.create(course_id, "task_type", "task_key", "task_input", self.instructor) - task_input = {"email_id": email.id} # pylint: disable=E1101 + task_input = {"email_id": email.id} # pylint: disable=no-member # (?i) is a regex for ignore case with self.assertRaisesRegexp(ValueError, r"(?i)course not found"): - perform_delegate_email_batches(entry.id, course_id, task_input, "action_name") # pylint: disable=E1101 + perform_delegate_email_batches(entry.id, course_id, task_input, "action_name") # pylint: disable=no-member def test_nonexistent_to_option(self): """ @@ -200,9 +200,9 @@ class TestEmailErrors(ModuleStoreTestCase): email = CourseEmail(course_id=self.course.id, to_option="IDONTEXIST") email.save() entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - task_input = {"email_id": email.id} # pylint: disable=E1101 + task_input = {"email_id": email.id} # pylint: disable=no-member with self.assertRaisesRegexp(Exception, 'Unexpected bulk email TO_OPTION found: IDONTEXIST'): - perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") # pylint: disable=E1101 + perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") # pylint: disable=no-member def test_wrong_course_id_in_task(self): """ @@ -211,9 +211,9 @@ class TestEmailErrors(ModuleStoreTestCase): email = CourseEmail(course_id=self.course.id, to_option=SEND_TO_ALL) email.save() entry = InstructorTask.create("bogus/task/id", "task_type", "task_key", "task_input", self.instructor) - task_input = {"email_id": email.id} # pylint: disable=E1101 + task_input = {"email_id": email.id} # pylint: disable=no-member with self.assertRaisesRegexp(ValueError, 'does not match task value'): - perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") # pylint: disable=E1101 + perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") # pylint: disable=no-member def test_wrong_course_id_in_email(self): """ @@ -222,14 +222,14 @@ class TestEmailErrors(ModuleStoreTestCase): email = CourseEmail(course_id=SlashSeparatedCourseKey("bogus", "course", "id"), to_option=SEND_TO_ALL) email.save() entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - task_input = {"email_id": email.id} # pylint: disable=E1101 + task_input = {"email_id": email.id} # pylint: disable=no-member with self.assertRaisesRegexp(ValueError, 'does not match email value'): - perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") # pylint: disable=E1101 + perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") # pylint: disable=no-member def test_send_email_undefined_subtask(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=E1101 + entry_id = entry.id # pylint: disable=no-member to_list = ['test@test.com'] global_email_context = {'course_title': 'dummy course'} subtask_id = "subtask-id-value" @@ -241,7 +241,7 @@ class TestEmailErrors(ModuleStoreTestCase): def test_send_email_missing_subtask(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=E1101 + entry_id = entry.id # pylint: disable=no-member to_list = ['test@test.com'] global_email_context = {'course_title': 'dummy course'} subtask_id = "subtask-id-value" @@ -255,7 +255,7 @@ class TestEmailErrors(ModuleStoreTestCase): def test_send_email_completed_subtask(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=E1101 + entry_id = entry.id # pylint: disable=no-member subtask_id = "subtask-id-value" initialize_subtask_info(entry, "emailed", 100, [subtask_id]) subtask_status = SubtaskStatus.create(subtask_id, state=SUCCESS) @@ -270,7 +270,7 @@ class TestEmailErrors(ModuleStoreTestCase): def test_send_email_running_subtask(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=E1101 + entry_id = entry.id # pylint: disable=no-member subtask_id = "subtask-id-value" initialize_subtask_info(entry, "emailed", 100, [subtask_id]) subtask_status = SubtaskStatus.create(subtask_id) @@ -285,7 +285,7 @@ class TestEmailErrors(ModuleStoreTestCase): def test_send_email_retried_subtask(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=E1101 + entry_id = entry.id # pylint: disable=no-member subtask_id = "subtask-id-value" initialize_subtask_info(entry, "emailed", 100, [subtask_id]) subtask_status = SubtaskStatus.create(subtask_id, state=RETRY, retried_nomax=2) @@ -305,7 +305,7 @@ class TestEmailErrors(ModuleStoreTestCase): def test_send_email_with_locked_instructor_task(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=E1101 + entry_id = entry.id # pylint: disable=no-member subtask_id = "subtask-id-locked-model" initialize_subtask_info(entry, "emailed", 100, [subtask_id]) subtask_status = SubtaskStatus.create(subtask_id) @@ -321,7 +321,7 @@ class TestEmailErrors(ModuleStoreTestCase): def test_send_email_undefined_email(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=E1101 + entry_id = entry.id # pylint: disable=no-member to_list = ['test@test.com'] global_email_context = {'course_title': 'dummy course'} subtask_id = "subtask-id-undefined-email" diff --git a/lms/djangoapps/bulk_email/tests/test_tasks.py b/lms/djangoapps/bulk_email/tests/test_tasks.py index dbc61fcec1..d2b00e0327 100644 --- a/lms/djangoapps/bulk_email/tests/test_tasks.py +++ b/lms/djangoapps/bulk_email/tests/test_tasks.py @@ -91,7 +91,7 @@ class TestBulkEmailInstructorTask(InstructorTaskCourseTestCase): to_option = SEND_TO_ALL course_id = course_id or self.course.id course_email = CourseEmail.create(course_id, self.instructor, to_option, "Test Subject", "

This is a test message

") - task_input = {'email_id': course_email.id} # pylint: disable=E1101 + task_input = {'email_id': course_email.id} # pylint: disable=no-member task_id = str(uuid4()) instructor_task = InstructorTaskFactory.create( course_id=course_id, @@ -134,7 +134,7 @@ class TestBulkEmailInstructorTask(InstructorTaskCourseTestCase): with self.assertRaises(ValueError): with patch('bulk_email.tasks.update_subtask_status', dummy_update_subtask_status): - send_bulk_course_email(task_entry.id, {}) # pylint: disable=E1101 + send_bulk_course_email(task_entry.id, {}) # pylint: disable=no-member def _create_students(self, num_students): """Create students for testing""" diff --git a/lms/djangoapps/course_wiki/views.py b/lms/djangoapps/course_wiki/views.py index c7a97fd077..f07b8d10c4 100644 --- a/lms/djangoapps/course_wiki/views.py +++ b/lms/djangoapps/course_wiki/views.py @@ -58,7 +58,7 @@ def course_wiki_redirect(request, course_id): # pylint: disable=W0613 new_site.domain = settings.SITE_NAME new_site.name = "edX" new_site.save() - site_id = str(new_site.id) # pylint: disable=E1101 + site_id = str(new_site.id) # pylint: disable=no-member if site_id != str(settings.SITE_ID): raise ImproperlyConfigured("No site object was created and the SITE_ID doesn't match the newly created one. {} != {}".format(site_id, settings.SITE_ID)) diff --git a/lms/djangoapps/courseware/tests/test_model_data.py b/lms/djangoapps/courseware/tests/test_model_data.py index f2f3fe532b..924a14de38 100644 --- a/lms/djangoapps/courseware/tests/test_model_data.py +++ b/lms/djangoapps/courseware/tests/test_model_data.py @@ -219,7 +219,7 @@ class StorageTestBase(object): """ # Disable pylint warnings that arise because of the way the child classes call # this base class -- pylint's static analysis can't keep up with it. - # pylint: disable=E1101, E1102 + # pylint: disable=no-member, E1102 factory = None scope = None diff --git a/lms/djangoapps/instructor/features/bulk_email.py b/lms/djangoapps/instructor/features/bulk_email.py index 415a26c102..90eed1ebd9 100644 --- a/lms/djangoapps/instructor/features/bulk_email.py +++ b/lms/djangoapps/instructor/features/bulk_email.py @@ -106,8 +106,8 @@ def when_i_send_an_email(step, recipient): # pylint: disable=unused-argument ) # Clear the queue of existing emails - while not mail.queue.empty(): # pylint: disable=E1101 - mail.queue.get() # pylint: disable=E1101 + while not mail.queue.empty(): # pylint: disable=no-member + mail.queue.get() # pylint: disable=no-member # Because we flush the database before each run, # we need to ensure that the email template fixture @@ -156,8 +156,8 @@ def then_the_email_is_sent(step, recipient): # pylint: disable=unused-argument # Retrieve messages. Because we are using celery in "always eager" # mode, we expect all messages to be sent by this point. messages = [] - while not mail.queue.empty(): # pylint: disable=E1101 - messages.append(mail.queue.get()) # pylint: disable=E1101 + while not mail.queue.empty(): # pylint: disable=no-member + messages.append(mail.queue.get()) # pylint: disable=no-member # Check that we got the right number of messages assert_equal( diff --git a/lms/djangoapps/instructor/tests/test_ecommerce.py b/lms/djangoapps/instructor/tests/test_ecommerce.py index d51e62e926..cb0dba3493 100644 --- a/lms/djangoapps/instructor/tests/test_ecommerce.py +++ b/lms/djangoapps/instructor/tests/test_ecommerce.py @@ -253,7 +253,7 @@ class TestECommerceDashboardViews(ModuleStoreTestCase): response = self.client.post(self.url) self.assertTrue('AS452' in response.content) data = { - 'coupon_id': coupon.id, 'code': 'AS452', 'discount': '10', 'description': 'updated_description', # pylint: disable=E1101 + 'coupon_id': coupon.id, 'code': 'AS452', 'discount': '10', 'description': 'updated_description', # pylint: disable=no-member 'course_id': coupon.course_id.to_deprecated_string() } # URL for update_coupon diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 0846a9ff2d..3a5a47b18a 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -1709,7 +1709,7 @@ def send_email(request, course_id): ) # Submit the task, so that the correct InstructorTask object gets created (for monitoring purposes) - instructor_task.api.submit_bulk_course_email(request, course_id, email.id) # pylint: disable=E1101 + instructor_task.api.submit_bulk_course_email(request, course_id, email.id) # pylint: disable=no-member response_payload = { 'course_id': course_id.to_deprecated_string(), diff --git a/lms/djangoapps/instructor/views/legacy.py b/lms/djangoapps/instructor/views/legacy.py index 262983de8e..8e8a48513a 100644 --- a/lms/djangoapps/instructor/views/legacy.py +++ b/lms/djangoapps/instructor/views/legacy.py @@ -860,7 +860,7 @@ def instructor_dashboard(request, course_id): ) # Submit the task, so that the correct InstructorTask object gets created (for monitoring purposes) - submit_bulk_course_email(request, course_key, email.id) # pylint: disable=E1101 + submit_bulk_course_email(request, course_key, email.id) # pylint: disable=no-member except Exception as err: # pylint: disable=broad-except # Catch any errors and deliver a message to the user diff --git a/lms/djangoapps/instructor_task/api_helper.py b/lms/djangoapps/instructor_task/api_helper.py index 3ac28890e6..344ef2dc43 100644 --- a/lms/djangoapps/instructor_task/api_helper.py +++ b/lms/djangoapps/instructor_task/api_helper.py @@ -301,7 +301,7 @@ def submit_task(request, task_type, task_class, course_key, task_input, task_key # submit task: task_id = instructor_task.task_id - task_args = [instructor_task.id, _get_xmodule_instance_args(request, task_id)] # pylint: disable=E1101 + task_args = [instructor_task.id, _get_xmodule_instance_args(request, task_id)] # pylint: disable=no-member task_class.apply_async(task_args, task_id=task_id) return instructor_task diff --git a/lms/djangoapps/instructor_task/subtasks.py b/lms/djangoapps/instructor_task/subtasks.py index 32c0b06f2d..093eddce98 100644 --- a/lms/djangoapps/instructor_task/subtasks.py +++ b/lms/djangoapps/instructor_task/subtasks.py @@ -307,7 +307,7 @@ def queue_subtasks_for_query(entry, action_name, create_subtask_fcn, item_querys entry.id, total_num_subtasks, total_num_items, - ) # pylint: disable=E1101 + ) # pylint: disable=no-member 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. diff --git a/lms/djangoapps/instructor_task/tests/test_api.py b/lms/djangoapps/instructor_task/tests/test_api.py index 2d83091f38..e70d9650be 100644 --- a/lms/djangoapps/instructor_task/tests/test_api.py +++ b/lms/djangoapps/instructor_task/tests/test_api.py @@ -170,7 +170,7 @@ class InstructorTaskCourseSubmitTest(TestReportMixin, InstructorTaskCourseTestCa def _define_course_email(self): """Create CourseEmail object for testing.""" course_email = CourseEmail.create(self.course.id, self.instructor, SEND_TO_ALL, "Test Subject", "

This is a test message

") - return course_email.id # pylint: disable=E1101 + return course_email.id # pylint: disable=no-member def _test_resubmission(self, api_call): """ @@ -181,7 +181,7 @@ class InstructorTaskCourseSubmitTest(TestReportMixin, InstructorTaskCourseTestCa `AlreadyRunningError`. """ instructor_task = api_call() - instructor_task = InstructorTask.objects.get(id=instructor_task.id) # pylint: disable=E1101 + instructor_task = InstructorTask.objects.get(id=instructor_task.id) # pylint: disable=no-member instructor_task.task_state = PROGRESS instructor_task.save() with self.assertRaises(AlreadyRunningError): diff --git a/lms/djangoapps/mobile_api/users/tests.py b/lms/djangoapps/mobile_api/users/tests.py index ccb93aeb5e..62d1d1f677 100644 --- a/lms/djangoapps/mobile_api/users/tests.py +++ b/lms/djangoapps/mobile_api/users/tests.py @@ -122,7 +122,7 @@ class TestUserApi(ModuleStoreTestCase, APITestCase): def test_course_serializer(self): self.client.login(username=self.username, password=self.password) self._enroll(self.course) - serialized = CourseEnrollmentSerializer(CourseEnrollment.enrollments_for_user(self.user)[0]).data # pylint: disable=E1101 + serialized = CourseEnrollmentSerializer(CourseEnrollment.enrollments_for_user(self.user)[0]).data # pylint: disable=no-member self.assertEqual(serialized['course']['video_outline'], None) self.assertEqual(serialized['course']['name'], self.course.display_name) self.assertEqual(serialized['course']['number'], self.course.id.course) @@ -135,7 +135,7 @@ class TestUserApi(ModuleStoreTestCase, APITestCase): self.client.login(username=self.username, password=self.password) self._enroll(self.course) - serialized = CourseEnrollmentSerializer(CourseEnrollment.enrollments_for_user(self.user)[0]).data # pylint: disable=E1101 + serialized = CourseEnrollmentSerializer(CourseEnrollment.enrollments_for_user(self.user)[0]).data # pylint: disable=no-member self.assertEqual(serialized['course']['number'], self.course.display_coursenumber) self.assertEqual(serialized['course']['org'], self.course.display_organization) diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index e3c22e63b6..1325052f2f 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -158,7 +158,7 @@ class Order(models.Model): Return the total cost of the cart. If the order has been purchased, returns total of all purchased and not refunded items. """ - return sum(i.line_cost for i in self.orderitem_set.filter(status=self.status)) # pylint: disable=E1101 + return sum(i.line_cost for i in self.orderitem_set.filter(status=self.status)) # pylint: disable=no-member def has_items(self, item_type=None): """ @@ -166,9 +166,9 @@ class Order(models.Model): If an item_type is passed in then we check to see if there are any items of that class type """ if not item_type: - return self.orderitem_set.exists() # pylint: disable=E1101 + return self.orderitem_set.exists() # pylint: disable=no-member else: - items = self.orderitem_set.all().select_subclasses() # pylint: disable=E1101 + items = self.orderitem_set.all().select_subclasses() # pylint: disable=no-member for item in items: if isinstance(item, item_type): return True @@ -178,7 +178,7 @@ class Order(models.Model): """ Reset the items price state in the user cart """ - for item in self.orderitem_set.all(): # pylint: disable=E1101 + for item in self.orderitem_set.all(): # pylint: disable=no-member if item.list_price: item.unit_cost = item.list_price item.list_price = None @@ -188,7 +188,7 @@ class Order(models.Model): """ Clear out all the items in the cart """ - self.orderitem_set.all().delete() # pylint: disable=E1101 + self.orderitem_set.all().delete() # pylint: disable=no-member @transaction.commit_on_success def start_purchase(self): @@ -216,7 +216,7 @@ class Order(models.Model): The UI/UX may change in the future to make the switching between PaidCourseRegistration and CourseRegCodeItems a more explicit UI gesture from the purchaser """ - cart_items = self.orderitem_set.all() # pylint: disable=E1101 + cart_items = self.orderitem_set.all() # pylint: disable=no-member is_order_type_business = False for cart_item in cart_items: if cart_item.qty > 1: @@ -272,7 +272,7 @@ class Order(models.Model): """ send confirmation e-mail """ - recipient_list = [(self.user.username, getattr(self.user, 'email'), 'user')] # pylint: disable=E1101 + recipient_list = [(self.user.username, getattr(self.user, 'email'), 'user')] # pylint: disable=no-member if self.company_contact_email: recipient_list.append((self.company_contact_name, self.company_contact_email, 'company_contact')) joined_course_names = "" @@ -310,7 +310,7 @@ class Order(models.Model): 'course_names': ", ".join([course_info[0] for course_info in courses_info]), 'dashboard_url': dashboard_url, 'currency_symbol': settings.PAID_COURSE_REGISTRATION_CURRENCY[1], - 'order_placed_by': '{username} ({email})'.format(username=self.user.username, email=getattr(self.user, 'email')), # pylint: disable=E1101 + 'order_placed_by': '{username} ({email})'.format(username=self.user.username, email=getattr(self.user, 'email')), # pylint: disable=no-member 'has_billing_info': settings.FEATURES['STORE_BILLING_INFO'], 'platform_name': microsite.get_value('platform_name', settings.PLATFORM_NAME), 'payment_support_email': microsite.get_value('payment_support_email', settings.PAYMENT_SUPPORT_EMAIL), @@ -333,7 +333,7 @@ class Order(models.Model): email.attach(u'RegistrationCodesRedemptionUrls.csv', csv_file.getvalue(), 'text/csv') email.send() except (smtplib.SMTPException, BotoServerError): # sadly need to handle diff. mail backends individually - log.error('Failed sending confirmation e-mail for order %d', self.id) # pylint: disable=E1101 + log.error('Failed sending confirmation e-mail for order %d', self.id) # pylint: disable=no-member def purchase(self, first='', last='', street1='', street2='', city='', state='', postalcode='', country='', ccnum='', cardtype='', processor_reply_dump=''): @@ -356,7 +356,7 @@ class Order(models.Model): """ if self.status == 'purchased': log.error( - u"`purchase` method called on order {}, but order is already purchased.".format(self.id) # pylint: disable=E1101 + u"`purchase` method called on order {}, but order is already purchased.".format(self.id) # pylint: disable=no-member ) return self.status = 'purchased' @@ -410,8 +410,8 @@ class Order(models.Model): try: if settings.FEATURES.get('SEGMENT_IO_LMS') and settings.SEGMENT_IO_LMS_KEY: tracking_context = tracker.get_tracker().resolve_context() - analytics.track(self.user.id, event_name, { # pylint: disable=E1101 - 'orderId': self.id, # pylint: disable=E1101 + analytics.track(self.user.id, event_name, { # pylint: disable=no-member + 'orderId': self.id, # pylint: disable=no-member 'total': str(self.total_cost), 'currency': self.currency, 'products': [item.analytics_data() for item in orderitems] @@ -427,7 +427,7 @@ class Order(models.Model): # errors in the logs. log.exception( u'Unable to emit {event} event for user {user} and order {order}'.format( - event=event_name, user=self.user.id, order=self.id) # pylint: disable=E1101 + event=event_name, user=self.user.id, order=self.id) # pylint: disable=no-member ) def add_billing_details(self, company_name='', company_contact_name='', company_contact_email='', recipient_name='', @@ -595,7 +595,7 @@ class OrderItem(TimeStampedModel): """ return { - 'id': self.id, # pylint: disable=E1101 + 'id': self.id, # pylint: disable=no-member 'sku': type(self).__name__, 'name': 'N/A', 'price': str(self.unit_cost), @@ -652,7 +652,7 @@ class CourseRegistrationCode(models.Model): for item in cart_items: CourseEnrollment.enroll(cart.user, item.course_id) log.info("Enrolled '{0}' in free course '{1}'" - .format(cart.user.email, item.course_id)) # pylint: disable=E1101 + .format(cart.user.email, item.course_id)) # pylint: disable=no-member item.status = 'purchased' item.save() @@ -834,7 +834,7 @@ class PaidCourseRegistration(OrderItem): This will return the total amount of money that a purchased course generated """ total_cost = 0 - result = cls.objects.filter(course_id=course_key, status='purchased').aggregate(total=Sum('unit_cost', field='qty * unit_cost')) # pylint: disable=E1101 + result = cls.objects.filter(course_id=course_key, status='purchased').aggregate(total=Sum('unit_cost', field='qty * unit_cost')) # pylint: disable=no-member if result['total'] is not None: total_cost = result['total'] @@ -911,7 +911,7 @@ class PaidCourseRegistration(OrderItem): CourseEnrollment.enroll(user=self.user, course_key=self.course_id, mode=self.mode) log.info("Enrolled {0} in paid course {1}, paid ${2}" - .format(self.user.email, self.course_id, self.line_cost)) # pylint: disable=E1101 + .format(self.user.email, self.course_id, self.line_cost)) # pylint: disable=no-member def generate_receipt_instructions(self): """ @@ -948,7 +948,7 @@ class PaidCourseRegistration(OrderItem): sku = data['sku'] if self.course_id != CourseKeyField.Empty: data['name'] = unicode(self.course_id) - data['category'] = unicode(self.course_id.org) # pylint: disable=E1101 + data['category'] = unicode(self.course_id.org) # pylint: disable=no-member if self.mode: data['sku'] = sku + u'.' + unicode(self.mode) return data @@ -979,7 +979,7 @@ class CourseRegCodeItem(OrderItem): This will return the total amount of money that a purchased course generated """ total_cost = 0 - result = cls.objects.filter(course_id=course_key, status='purchased').aggregate(total=Sum('unit_cost', field='qty * unit_cost')) # pylint: disable=E1101 + result = cls.objects.filter(course_id=course_key, status='purchased').aggregate(total=Sum('unit_cost', field='qty * unit_cost')) # pylint: disable=no-member if result['total'] is not None: total_cost = result['total'] @@ -1061,7 +1061,7 @@ class CourseRegCodeItem(OrderItem): save_registration_code(self.user, self.course_id, invoice=None, order=self.order) log.info("Enrolled {0} in paid course {1}, paid ${2}" - .format(self.user.email, self.course_id, self.line_cost)) # pylint: disable=E1101 + .format(self.user.email, self.course_id, self.line_cost)) # pylint: disable=no-member @property def csv_report_comments(self): @@ -1088,7 +1088,7 @@ class CourseRegCodeItem(OrderItem): sku = data['sku'] if self.course_id != CourseKeyField.Empty: data['name'] = unicode(self.course_id) - data['category'] = unicode(self.course_id.org) # pylint: disable=E1101 + data['category'] = unicode(self.course_id.org) # pylint: disable=no-member if self.mode: data['sku'] = sku + u'.' + unicode(self.mode) return data @@ -1328,7 +1328,7 @@ class CertificateItem(OrderItem): sku = data['sku'] if self.course_id != CourseKeyField.Empty: data['name'] = unicode(self.course_id) - data['category'] = unicode(self.course_id.org) # pylint: disable=E1101 + data['category'] = unicode(self.course_id.org) # pylint: disable=no-member if self.mode: data['sku'] = sku + u'.' + unicode(self.mode) return data @@ -1496,7 +1496,7 @@ class Donation(OrderItem): data = super(Donation, self).analytics_data() if self.course_id != CourseKeyField.Empty: data['name'] = unicode(self.course_id) - data['category'] = unicode(self.course_id.org) # pylint: disable=E1101 + data['category'] = unicode(self.course_id.org) # pylint: disable=no-member else: data['name'] = settings.PLATFORM_NAME data['category'] = settings.PLATFORM_NAME diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index d058b414e9..b16749e2e5 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -405,7 +405,7 @@ class ShoppingCartViewsTests(ModuleStoreTestCase): item = self.cart.orderitem_set.all().select_subclasses()[1] self.assertEquals(item.unit_cost, self.get_discount(self.testing_cost)) - def test_soft_delete_coupon(self): # pylint: disable=E1101 + def test_soft_delete_coupon(self): # pylint: disable=no-member self.add_coupon(self.course_key, True, self.coupon_code) coupon = Coupon(code='TestCode', description='testing', course_id=self.course_key, percentage_discount=12, created_by=self.user, is_active=True) @@ -416,25 +416,25 @@ class ShoppingCartViewsTests(ModuleStoreTestCase): get_coupon = Coupon.objects.get(id=1) request = HttpRequest() request.user = admin - setattr(request, 'session', 'session') # pylint: disable=E1101 - messages = FallbackStorage(request) # pylint: disable=E1101 - setattr(request, '_messages', messages) # pylint: disable=E1101 + setattr(request, 'session', 'session') # pylint: disable=no-member + messages = FallbackStorage(request) # pylint: disable=no-member + setattr(request, '_messages', messages) # pylint: disable=no-member coupon_admin = SoftDeleteCouponAdmin(Coupon, AdminSite()) test_query_set = coupon_admin.queryset(request) test_actions = coupon_admin.get_actions(request) self.assertTrue('really_delete_selected' in test_actions['really_delete_selected']) self.assertEqual(get_coupon.is_active, True) - coupon_admin.really_delete_selected(request, test_query_set) # pylint: disable=E1101 + coupon_admin.really_delete_selected(request, test_query_set) # pylint: disable=no-member for coupon in test_query_set: self.assertEqual(coupon.is_active, False) - coupon_admin.delete_model(request, get_coupon) # pylint: disable=E1101 + coupon_admin.delete_model(request, get_coupon) # pylint: disable=no-member self.assertEqual(get_coupon.is_active, False) coupon = Coupon(code='TestCode123', description='testing123', course_id=self.course_key, percentage_discount=22, created_by=self.user, is_active=True) coupon.save() test_query_set = coupon_admin.queryset(request) - coupon_admin.really_delete_selected(request, test_query_set) # pylint: disable=E1101 + coupon_admin.really_delete_selected(request, test_query_set) # pylint: disable=no-member for coupon in test_query_set: self.assertEqual(coupon.is_active, False) From b8c16d5ed78b9d27b565e0a4ffee1f805f771dbf Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 00:20:22 -0500 Subject: [PATCH 07/39] s/pylint: disable=E1120/pylint: disable=no-value-for-parameter/ --- cms/envs/bok_choy.py | 6 +++--- common/test/acceptance/tests/helpers.py | 2 +- lms/djangoapps/dashboard/sysadmin_urls.py | 2 +- lms/envs/bok_choy.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index a7c54076e9..f8a6fda879 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -13,7 +13,7 @@ from path import path # This is a convenience for ensuring (a) that we can consistently find the files # and (b) that the files are the same in Jenkins as in local dev. os.environ['SERVICE_VARIANT'] = 'bok_choy' -os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() # pylint: disable=E1120 +os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() # pylint: disable=no-value-for-parameter from .aws import * # pylint: disable=W0401, W0614 @@ -23,7 +23,7 @@ from .aws import * # pylint: disable=W0401, W0614 INSTALLED_APPS += ('django_extensions',) # Redirect to the test_root folder within the repo -TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" # pylint: disable=E1120 +TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" # pylint: disable=no-value-for-parameter GITHUB_REPO_ROOT = (TEST_ROOT / "data").abspath() LOG_DIR = (TEST_ROOT / "log").abspath() @@ -31,7 +31,7 @@ LOG_DIR = (TEST_ROOT / "log").abspath() update_module_store_settings( MODULESTORE, module_store_options={ - 'fs_root': (TEST_ROOT / "data").abspath(), # pylint: disable=E1120 + 'fs_root': (TEST_ROOT / "data").abspath(), # pylint: disable=no-value-for-parameter }, xml_store_options={ 'data_dir': (TEST_ROOT / "data").abspath(), diff --git a/common/test/acceptance/tests/helpers.py b/common/test/acceptance/tests/helpers.py index 2fe931be96..7b833dde22 100644 --- a/common/test/acceptance/tests/helpers.py +++ b/common/test/acceptance/tests/helpers.py @@ -69,7 +69,7 @@ def load_data_str(rel_path): Load a file from the "data" directory as a string. `rel_path` is the path relative to the data directory. """ - full_path = path(__file__).abspath().dirname() / "data" / rel_path # pylint: disable=E1120 + full_path = path(__file__).abspath().dirname() / "data" / rel_path # pylint: disable=no-value-for-parameter with open(full_path) as data_file: return data_file.read() diff --git a/lms/djangoapps/dashboard/sysadmin_urls.py b/lms/djangoapps/dashboard/sysadmin_urls.py index e543537415..a762e97562 100644 --- a/lms/djangoapps/dashboard/sysadmin_urls.py +++ b/lms/djangoapps/dashboard/sysadmin_urls.py @@ -1,7 +1,7 @@ """ Urls for sysadmin dashboard feature """ -# pylint: disable=E1120 +# pylint: disable=no-value-for-parameter from django.conf.urls import patterns, url diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index b67c3ac36f..b111da3499 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -6,7 +6,7 @@ import os from path import path from tempfile import mkdtemp -CONFIG_ROOT = path(__file__).abspath().dirname() # pylint: disable=E1120 +CONFIG_ROOT = path(__file__).abspath().dirname() # pylint: disable=no-value-for-parameter TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" ########################## Prod-like settings ################################### @@ -34,7 +34,7 @@ LOG_DIR = (TEST_ROOT / "log").abspath() update_module_store_settings( MODULESTORE, module_store_options={ - 'fs_root': (TEST_ROOT / "data").abspath(), # pylint: disable=E1120 + 'fs_root': (TEST_ROOT / "data").abspath(), # pylint: disable=no-value-for-parameter }, xml_store_options={ 'data_dir': (TEST_ROOT / "data").abspath(), From b4d24f36c839ac3c045214759137fa8a2a7db6d5 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 00:24:43 -0500 Subject: [PATCH 08/39] s/pylint: disable=E1103/pylint: disable=maybe-no-member/ --- common/djangoapps/contentserver/tests/test.py | 10 +++++----- .../student/management/tests/test_transfer_students.py | 2 +- common/djangoapps/student/tests/test_auto_auth.py | 4 ++-- lms/djangoapps/dashboard/tests/test_support.py | 2 +- lms/djangoapps/instructor/views/api.py | 2 +- lms/djangoapps/mobile_api/course_info/tests.py | 4 ++-- lms/djangoapps/mobile_api/video_outlines/tests.py | 2 +- lms/djangoapps/shoppingcart/tests/test_models.py | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/common/djangoapps/contentserver/tests/test.py b/common/djangoapps/contentserver/tests/test.py index 872dea3af8..9aa5204920 100644 --- a/common/djangoapps/contentserver/tests/test.py +++ b/common/djangoapps/contentserver/tests/test.py @@ -69,7 +69,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): """ self.client.logout() resp = self.client.get(self.url_unlocked) - self.assertEqual(resp.status_code, 200) # pylint: disable=E1103 + self.assertEqual(resp.status_code, 200) def test_locked_asset_not_logged_in(self): """ @@ -78,7 +78,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): """ self.client.logout() resp = self.client.get(self.url_locked) - self.assertEqual(resp.status_code, 403) # pylint: disable=E1103 + self.assertEqual(resp.status_code, 403) def test_locked_asset_not_registered(self): """ @@ -87,7 +87,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): """ self.client.login(username=self.non_staff_usr, password=self.non_staff_pwd) resp = self.client.get(self.url_locked) - self.assertEqual(resp.status_code, 403) # pylint: disable=E1103 + self.assertEqual(resp.status_code, 403) def test_locked_asset_registered(self): """ @@ -99,7 +99,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): self.client.login(username=self.non_staff_usr, password=self.non_staff_pwd) resp = self.client.get(self.url_locked) - self.assertEqual(resp.status_code, 200) # pylint: disable=E1103 + self.assertEqual(resp.status_code, 200) def test_locked_asset_staff(self): """ @@ -107,7 +107,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): """ self.client.login(username=self.staff_usr, password=self.staff_pwd) resp = self.client.get(self.url_locked) - self.assertEqual(resp.status_code, 200) # pylint: disable=E1103 + self.assertEqual(resp.status_code, 200) def test_range_request_full_file(self): """ diff --git a/common/djangoapps/student/management/tests/test_transfer_students.py b/common/djangoapps/student/management/tests/test_transfer_students.py index f9847c037d..a0d14a93aa 100644 --- a/common/djangoapps/student/management/tests/test_transfer_students.py +++ b/common/djangoapps/student/management/tests/test_transfer_students.py @@ -75,7 +75,7 @@ class TestTransferStudents(ModuleStoreTestCase): self.assertTrue(self.signal_fired) # Confirm the analytics event was emitted. - self.mock_tracker.emit.assert_has_calls( # pylint: disable=E1103 + self.mock_tracker.emit.assert_has_calls( # pylint: disable=maybe-no-member [ call( EVENT_NAME_ENROLLMENT_ACTIVATED, diff --git a/common/djangoapps/student/tests/test_auto_auth.py b/common/djangoapps/student/tests/test_auto_auth.py index fd6a8b4092..d94e89d097 100644 --- a/common/djangoapps/student/tests/test_auto_auth.py +++ b/common/djangoapps/student/tests/test_auto_auth.py @@ -163,8 +163,8 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase): # Check that session and CSRF are set in the response for cookie in ['csrftoken', 'sessionid']: - self.assertIn(cookie, response.cookies) # pylint: disable=E1103 - self.assertTrue(response.cookies[cookie].value) # pylint: disable=E1103 + self.assertIn(cookie, response.cookies) # pylint: disable=maybe-no-member + self.assertTrue(response.cookies[cookie].value) # pylint: disable=maybe-no-member class AutoAuthDisabledTestCase(UrlResetMixin, TestCase): diff --git a/lms/djangoapps/dashboard/tests/test_support.py b/lms/djangoapps/dashboard/tests/test_support.py index b008822dac..a2173879cf 100644 --- a/lms/djangoapps/dashboard/tests/test_support.py +++ b/lms/djangoapps/dashboard/tests/test_support.py @@ -106,7 +106,7 @@ class RefundTests(ModuleStoreTestCase): pars['confirmed'] = 'true' response = self.client.post('/support/refund/', pars) self.assertTrue(response.status_code, 302) - response = self.client.get(response.get('location')) # pylint: disable=E1103 + response = self.client.get(response.get('location')) # pylint: disable=maybe-no-member self.assertContains(response, "Unenrolled %s from" % self.student) self.assertContains(response, "Refunded 1 for order id") diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 3a5a47b18a..7327a43642 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -1229,7 +1229,7 @@ def spent_registration_codes(request, course_id): # pylint: disable=W0613 company_name = request.POST['spent_company_name'] if company_name: - spent_codes_list = spent_codes_list.filter(invoice__company_name=company_name) # pylint: disable=E1103 + spent_codes_list = spent_codes_list.filter(invoice__company_name=company_name) # pylint: disable=maybe-no-member csv_type = 'spent' return registration_codes_csv("Spent_Registration_Codes.csv", spent_codes_list, csv_type) diff --git a/lms/djangoapps/mobile_api/course_info/tests.py b/lms/djangoapps/mobile_api/course_info/tests.py index a470e7df75..e46d8f0ee6 100644 --- a/lms/djangoapps/mobile_api/course_info/tests.py +++ b/lms/djangoapps/mobile_api/course_info/tests.py @@ -25,7 +25,7 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase): url = reverse('course-about-detail', kwargs={'course_id': unicode(self.course.id)}) response = self.client.get(url) self.assertEqual(response.status_code, 200) - self.assertTrue('overview' in response.data) # pylint: disable=E1103 + self.assertTrue('overview' in response.data) # pylint: disable=maybe-no-member def test_handouts(self): url = reverse('course-handouts-list', kwargs={'course_id': unicode(self.course.id)}) @@ -36,5 +36,5 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase): url = reverse('course-updates-list', kwargs={'course_id': unicode(self.course.id)}) response = self.client.get(url) self.assertEqual(response.status_code, 200) - self.assertEqual(response.data, []) # pylint: disable=E1103 + self.assertEqual(response.data, []) # pylint: disable=maybe-no-member # TODO: add handouts and updates, somehow diff --git a/lms/djangoapps/mobile_api/video_outlines/tests.py b/lms/djangoapps/mobile_api/video_outlines/tests.py index 15ab7b4ab8..ddbc547c5e 100644 --- a/lms/djangoapps/mobile_api/video_outlines/tests.py +++ b/lms/djangoapps/mobile_api/video_outlines/tests.py @@ -127,7 +127,7 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase): url = reverse('video-summary-list', kwargs={'course_id': unicode(self.course.id)}) response = self.client.get(url) self.assertEqual(response.status_code, 200) - return response.data # pylint: disable=E1103 + return response.data # pylint: disable=maybe-no-member def _create_video_with_subs(self): """ diff --git a/lms/djangoapps/shoppingcart/tests/test_models.py b/lms/djangoapps/shoppingcart/tests/test_models.py index 809c717961..0fa9f6cf72 100644 --- a/lms/djangoapps/shoppingcart/tests/test_models.py +++ b/lms/djangoapps/shoppingcart/tests/test_models.py @@ -180,7 +180,7 @@ class OrderTest(ModuleStoreTestCase): self.assertIn(item.additional_instruction_text, mail.outbox[0].body) # Assert Google Analytics event fired for purchase. - self.mock_tracker.track.assert_called_once_with( # pylint: disable=E1103 + self.mock_tracker.track.assert_called_once_with( # pylint: disable=maybe-no-member 1, 'Completed Order', { From 1e0f3ddb7d871776d615efe1614e18e0a650ab48 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 00:42:05 -0500 Subject: [PATCH 09/39] s/pylint: disable=E1111,E1124/pylint: disable=assignment-from-no-return,redundant-keyword-arg/ --- .../third_party_auth/tests/test_change_enrollment.py | 8 ++++---- lms/djangoapps/instructor/tests/test_api.py | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/djangoapps/third_party_auth/tests/test_change_enrollment.py b/common/djangoapps/third_party_auth/tests/test_change_enrollment.py index 73ecd1022b..db76ff6904 100644 --- a/common/djangoapps/third_party_auth/tests/test_change_enrollment.py +++ b/common/djangoapps/third_party_auth/tests/test_change_enrollment.py @@ -62,7 +62,7 @@ class PipelineEnrollmentTest(ModuleStoreTestCase): strategy = self._fake_strategy() strategy.session_set('enroll_course_id', unicode(self.course.id)) - result = pipeline.change_enrollment(strategy, 1, user=self.user) # pylint: disable=E1111,E1124 + result = pipeline.change_enrollment(strategy, 1, user=self.user) # pylint: disable=assignment-from-no-return,redundant-keyword-arg self.assertEqual(result, {}) # Check that the user was or was not enrolled @@ -86,7 +86,7 @@ class PipelineEnrollmentTest(ModuleStoreTestCase): # Simulate the pipeline step for enrolling in this course strategy = self._fake_strategy() strategy.session_set('enroll_course_id', unicode(self.course.id)) - result = pipeline.change_enrollment(strategy, 1, user=self.user) # pylint: disable=E1111,E1124 + result = pipeline.change_enrollment(strategy, 1, user=self.user) # pylint: disable=assignment-from-no-return,redundant-keyword-arg self.assertEqual(result, {}) # Expect that the uesr is NOT enrolled in the course @@ -109,7 +109,7 @@ class PipelineEnrollmentTest(ModuleStoreTestCase): # This should fail silently, with no exception strategy = self._fake_strategy() strategy.session_set('enroll_course_id', unicode(self.course.id)) - result = pipeline.change_enrollment(strategy, 1, user=self.user) # pylint: disable=E1111,E1124 + result = pipeline.change_enrollment(strategy, 1, user=self.user) # pylint: disable=assignment-from-no-return,redundant-keyword-arg self.assertEqual(result, {}) # Verify that we were NOT enrolled @@ -117,7 +117,7 @@ class PipelineEnrollmentTest(ModuleStoreTestCase): def test_no_course_id_skips_enroll(self): strategy = self._fake_strategy() - result = pipeline.change_enrollment(strategy, 1, user=self.user) # pylint: disable=E1111,E1124 + result = pipeline.change_enrollment(strategy, 1, user=self.user) # pylint: disable=assignment-from-no-return,redundant-keyword-arg self.assertEqual(result, {}) self.assertFalse(CourseEnrollment.is_enrolled(self.user, self.course.id)) diff --git a/lms/djangoapps/instructor/tests/test_api.py b/lms/djangoapps/instructor/tests/test_api.py index 65fca3c5ae..55c7ad3e57 100644 --- a/lms/djangoapps/instructor/tests/test_api.py +++ b/lms/djangoapps/instructor/tests/test_api.py @@ -2,7 +2,7 @@ """ Unit tests for instructor.api methods. """ -# pylint: disable=E1111 + import unittest import json import requests @@ -111,26 +111,26 @@ class TestCommonExceptions400(unittest.TestCase): def test_user_doesnotexist(self): self.request.is_ajax.return_value = False - resp = view_user_doesnotexist(self.request) + resp = view_user_doesnotexist(self.request) # pylint: disable=assignment-from-no-return self.assertEqual(resp.status_code, 400) self.assertIn("User does not exist", resp.content) def test_user_doesnotexist_ajax(self): self.request.is_ajax.return_value = True - resp = view_user_doesnotexist(self.request) + resp = view_user_doesnotexist(self.request) # pylint: disable=assignment-from-no-return self.assertEqual(resp.status_code, 400) result = json.loads(resp.content) self.assertIn("User does not exist", result["error"]) def test_alreadyrunningerror(self): self.request.is_ajax.return_value = False - resp = view_alreadyrunningerror(self.request) + resp = view_alreadyrunningerror(self.request) # pylint: disable=assignment-from-no-return self.assertEqual(resp.status_code, 400) self.assertIn("Task is already running", resp.content) def test_alreadyrunningerror_ajax(self): self.request.is_ajax.return_value = True - resp = view_alreadyrunningerror(self.request) + resp = view_alreadyrunningerror(self.request) # pylint: disable=assignment-from-no-return self.assertEqual(resp.status_code, 400) result = json.loads(resp.content) self.assertIn("Task is already running", result["error"]) From c904bd70cde4f6cfea7249e8af665d3710fad73f Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 00:57:22 -0500 Subject: [PATCH 10/39] s/pylint: disable=E0604/pylint: disable=invalid-all-object/ --- common/lib/capa/capa/responsetypes.py | 37 +++++++++++++++------------ 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 1caa9f07e4..6bcf7f1d54 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -3161,20 +3161,23 @@ class ChoiceTextResponse(LoncapaResponse): # TEMPORARY: List of all response subclasses # FIXME: To be replaced by auto-registration -# pylint: disable=E0604 -__all__ = [CodeResponse, - NumericalResponse, - FormulaResponse, - CustomResponse, - SchematicResponse, - ExternalResponse, - ImageResponse, - OptionResponse, - SymbolicResponse, - StringResponse, - ChoiceResponse, - MultipleChoiceResponse, - TrueFalseResponse, - JavascriptResponse, - AnnotationResponse, - ChoiceTextResponse] +# pylint: disable=invalid-all-object +__all__ = [ + CodeResponse, + NumericalResponse, + FormulaResponse, + CustomResponse, + SchematicResponse, + ExternalResponse, + ImageResponse, + OptionResponse, + SymbolicResponse, + StringResponse, + ChoiceResponse, + MultipleChoiceResponse, + TrueFalseResponse, + JavascriptResponse, + AnnotationResponse, + ChoiceTextResponse, +] +# pylint: enable=invalid-all-object From e8b336efef2a7436d7a1f1b94cd556c3f20b3ab7 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 00:58:34 -0500 Subject: [PATCH 11/39] s/pylint: disable=E1121/pylint: disable=too-many-function-args/ --- common/lib/xmodule/xmodule/static_content.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/static_content.py b/common/lib/xmodule/xmodule/static_content.py index aabddf721a..a9b4512b0d 100755 --- a/common/lib/xmodule/xmodule/static_content.py +++ b/common/lib/xmodule/xmodule/static_content.py @@ -171,7 +171,7 @@ def _write_files(output_root, contents, generated_suffix_map=None): # not_file is included to short-circuit this check, because # read_md5 depends on the file already existing - write_file = not_file or output_file.read_md5() != hashlib.md5(file_content).digest() # pylint: disable=E1121 + write_file = not_file or output_file.read_md5() != hashlib.md5(file_content).digest() # pylint: disable=too-many-function-args if write_file: LOG.debug("Writing %s", output_file) output_file.write_bytes(file_content) From aa7cc2b79ee3487727b4836441a88d53bf29a7c7 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 01:05:25 -0500 Subject: [PATCH 12/39] s/pylint: disable=E0702/pylint: disable=raising-bad-type/ --- lms/djangoapps/bulk_email/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/bulk_email/tasks.py b/lms/djangoapps/bulk_email/tasks.py index 3820a9be1f..a7d99bd4f0 100644 --- a/lms/djangoapps/bulk_email/tasks.py +++ b/lms/djangoapps/bulk_email/tasks.py @@ -336,11 +336,11 @@ def send_course_email(entry_id, email_id, to_list, global_email_context, subtask # was encountered has already been updated before the retry call was made, # so we only log here. log.warning("Send-email task %s for email %s: being retried", current_task_id, email_id) - raise send_exception # pylint: disable=E0702 + raise send_exception # pylint: disable=raising-bad-type else: log.error("Send-email task %s for email %s: failed: %s", current_task_id, email_id, send_exception) update_subtask_status(entry_id, current_task_id, new_subtask_status) - raise send_exception # pylint: disable=E0702 + raise send_exception # pylint: disable=raising-bad-type # return status in a form that can be serialized by Celery into JSON: log.info("Send-email task %s for email %s: returning status %s", current_task_id, email_id, new_subtask_status) From 89b6adadf2e2d7b2eb9ac4be32f31dd7e94c85f4 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 01:07:12 -0500 Subject: [PATCH 13/39] s/pylint: disable=E1102/pylint: disable=not-callable/ --- lms/djangoapps/bulk_email/tasks.py | 2 +- lms/djangoapps/courseware/tests/test_model_data.py | 2 +- lms/djangoapps/instructor_task/tasks.py | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lms/djangoapps/bulk_email/tasks.py b/lms/djangoapps/bulk_email/tasks.py index a7d99bd4f0..c3b17339c3 100644 --- a/lms/djangoapps/bulk_email/tasks.py +++ b/lms/djangoapps/bulk_email/tasks.py @@ -252,7 +252,7 @@ def perform_delegate_email_batches(entry_id, course_id, task_input, action_name) return progress -@task(default_retry_delay=settings.BULK_EMAIL_DEFAULT_RETRY_DELAY, max_retries=settings.BULK_EMAIL_MAX_RETRIES) # pylint: disable=E1102 +@task(default_retry_delay=settings.BULK_EMAIL_DEFAULT_RETRY_DELAY, max_retries=settings.BULK_EMAIL_MAX_RETRIES) # pylint: disable=not-callable def send_course_email(entry_id, email_id, to_list, global_email_context, subtask_status_dict): """ Sends an email to a list of recipients. diff --git a/lms/djangoapps/courseware/tests/test_model_data.py b/lms/djangoapps/courseware/tests/test_model_data.py index 924a14de38..f1a680da96 100644 --- a/lms/djangoapps/courseware/tests/test_model_data.py +++ b/lms/djangoapps/courseware/tests/test_model_data.py @@ -219,7 +219,7 @@ class StorageTestBase(object): """ # Disable pylint warnings that arise because of the way the child classes call # this base class -- pylint's static analysis can't keep up with it. - # pylint: disable=no-member, E1102 + # pylint: disable=no-member, not-callable factory = None scope = None diff --git a/lms/djangoapps/instructor_task/tasks.py b/lms/djangoapps/instructor_task/tasks.py index 7e62ba929a..518d71da0a 100644 --- a/lms/djangoapps/instructor_task/tasks.py +++ b/lms/djangoapps/instructor_task/tasks.py @@ -36,7 +36,7 @@ from instructor_task.tasks_helper import ( from bulk_email.tasks import perform_delegate_email_batches -@task(base=BaseInstructorTask) # pylint: disable=E1102 +@task(base=BaseInstructorTask) # pylint: disable=not-callable def rescore_problem(entry_id, xmodule_instance_args): """Rescores a problem in a course, for all students or one specific student. @@ -67,7 +67,7 @@ def rescore_problem(entry_id, xmodule_instance_args): return run_main_task(entry_id, visit_fcn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=E1102 +@task(base=BaseInstructorTask) # pylint: disable=not-callable def reset_problem_attempts(entry_id, xmodule_instance_args): """Resets problem attempts to zero for a particular problem for all students in a course. @@ -89,7 +89,7 @@ def reset_problem_attempts(entry_id, xmodule_instance_args): return run_main_task(entry_id, visit_fcn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=E1102 +@task(base=BaseInstructorTask) # pylint: disable=not-callable def delete_problem_state(entry_id, xmodule_instance_args): """Deletes problem state entirely for all students on a particular problem in a course. @@ -111,7 +111,7 @@ def delete_problem_state(entry_id, xmodule_instance_args): return run_main_task(entry_id, visit_fcn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=E1102 +@task(base=BaseInstructorTask) # pylint: disable=not-callable def send_bulk_course_email(entry_id, _xmodule_instance_args): """Sends emails to recipients enrolled in a course. @@ -132,7 +132,7 @@ def send_bulk_course_email(entry_id, _xmodule_instance_args): return run_main_task(entry_id, visit_fcn, action_name) -@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=E1102 +@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=not-callable def calculate_grades_csv(entry_id, xmodule_instance_args): """ Grade a course and push the results to an S3 bucket for download. @@ -143,7 +143,7 @@ def calculate_grades_csv(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=E1102 +@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=not-callable def calculate_students_features_csv(entry_id, xmodule_instance_args): """ Compute student profile information for a course and upload the From f2626e689672f5875c38a92d59166f0d65fd6557 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 01:12:47 -0500 Subject: [PATCH 14/39] s/disable=E0213,W0613/disable=no-self-argument,unused-argument/ --- lms/djangoapps/shoppingcart/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index 1325052f2f..3a769aa706 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -1133,7 +1133,7 @@ class CertificateItem(OrderItem): mode = models.SlugField() @receiver(UNENROLL_DONE) - def refund_cert_callback(sender, course_enrollment=None, skip_refund=False, **kwargs): # pylint: disable=E0213,W0613 + def refund_cert_callback(sender, course_enrollment=None, skip_refund=False, **kwargs): # pylint: disable=no-self-argument,unused-argument """ When a CourseEnrollment object calls its unenroll method, this function checks to see if that unenrollment occurred in a verified certificate that was within the refund deadline. If so, it actually performs the From d14c39a13ea314c64fd90153bc247a9c42740b23 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 01:27:15 -0500 Subject: [PATCH 15/39] Fix exposed pylint violations --- cms/djangoapps/contentstore/utils.py | 3 +++ cms/envs/debug_upload.py | 4 ++++ .../xmodule/xmodule/modulestore/tests/test_modulestore.py | 5 +++++ common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py | 3 +++ common/lib/xmodule/xmodule/tests/test_stringify.py | 3 +++ lms/djangoapps/django_comment_client/tests.py | 3 +++ lms/djangoapps/django_comment_client/tests/test_utils.py | 1 + 7 files changed, 22 insertions(+) diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index b5a8c525f2..914ad1ec65 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -1,3 +1,6 @@ +""" +Common utility functions useful throughout the contentstore +""" # pylint: disable=no-member import copy diff --git a/cms/envs/debug_upload.py b/cms/envs/debug_upload.py index 58f31a99e0..c854d9c933 100644 --- a/cms/envs/debug_upload.py +++ b/cms/envs/debug_upload.py @@ -1,3 +1,7 @@ +""" +A new cms ENV configuration to use a slow upload file handler to help test +progress bars in uploads +""" # pylint: disable=W0614, W0401 from .dev import * diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py index ebc6892729..ba3d54bfc0 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py @@ -1,3 +1,8 @@ +""" +Defines a test function, check_has_course_method, useful in various modulestore tests. + +This file should potentially be renamed "utilties" since this file contains no tests. +""" from nose.tools import assert_equals, assert_true, assert_false # pylint: disable=no-name-in-module diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py index 9da34dbb5d..663be7a467 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py @@ -1,3 +1,6 @@ +""" +Unit tests for the Mongo modulestore +""" # pylint: disable=no-member # pylint: disable=W0212 # pylint: disable=no-name-in-module diff --git a/common/lib/xmodule/xmodule/tests/test_stringify.py b/common/lib/xmodule/xmodule/tests/test_stringify.py index 8bdf59f5ba..1aacfc0dc9 100644 --- a/common/lib/xmodule/xmodule/tests/test_stringify.py +++ b/common/lib/xmodule/xmodule/tests/test_stringify.py @@ -1,3 +1,6 @@ +""" +Tests stringify functions used in xmodule html +""" from nose.tools import assert_equals # pylint: disable=no-name-in-module from lxml import etree from xmodule.stringify import stringify_children diff --git a/lms/djangoapps/django_comment_client/tests.py b/lms/djangoapps/django_comment_client/tests.py index d9f601ad0b..dd6b4b5832 100644 --- a/lms/djangoapps/django_comment_client/tests.py +++ b/lms/djangoapps/django_comment_client/tests.py @@ -1,3 +1,6 @@ +""" +Tests of various permissions levels for the comment client +""" import string # pylint: disable=W0402 import random diff --git a/lms/djangoapps/django_comment_client/tests/test_utils.py b/lms/djangoapps/django_comment_client/tests/test_utils.py index a6c9fc5861..50ffbe6381 100644 --- a/lms/djangoapps/django_comment_client/tests/test_utils.py +++ b/lms/djangoapps/django_comment_client/tests/test_utils.py @@ -114,6 +114,7 @@ class CoursewareContextTestCase(ModuleStoreTestCase): utils.add_courseware_context(threads, self.course) def assertThreadCorrect(thread, discussion, expected_title): # pylint: disable=invalid-name + """Asserts that the given thread has the expected set of properties""" self.assertEqual( set(thread.keys()), set(["commentable_id", "courseware_url", "courseware_title"]) From e15d4aea71ffe90271c004df7938577ad1df8fe2 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 01:37:22 -0500 Subject: [PATCH 16/39] s/pylint: disable=F0401/pylint: disable=import-error/ --- cms/envs/acceptance.py | 2 +- cms/envs/bok_choy.py | 2 +- cms/envs/dev.py | 2 +- cms/envs/devstack.py | 2 +- .../student/management/tests/test_transfer_students.py | 2 +- common/djangoapps/third_party_auth/pipeline.py | 4 ++-- .../third_party_auth/tests/test_change_enrollment.py | 2 +- lms/envs/acceptance.py | 2 +- lms/envs/bok_choy.py | 2 +- lms/envs/dev.py | 2 +- lms/envs/devstack.py | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index 5e596783cd..0df379aa54 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -113,7 +113,7 @@ SELENIUM_GRID = { ##################################################################### # Lastly, see if the developer has any local overrides. try: - from .private import * # pylint: disable=F0401 + from .private import * # pylint: disable=import-error except ImportError: pass diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index f8a6fda879..7353253456 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -66,6 +66,6 @@ YOUTUBE['TEXT_API']['url'] = "127.0.0.1:{0}/test_transcripts_youtube/".format(YO ##################################################################### # Lastly, see if the developer has any local overrides. try: - from .private import * # pylint: disable=F0401 + from .private import * # pylint: disable=import-error except ImportError: pass diff --git a/cms/envs/dev.py b/cms/envs/dev.py index edfe8fe8eb..f0aa0fc006 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -180,6 +180,6 @@ if SEGMENT_IO_KEY: ##################################################################### # Lastly, see if the developer has any local overrides. try: - from .private import * # pylint: disable=F0401 + from .private import * # pylint: disable=import-error except ImportError: pass diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index f45e601e6e..50fc0a1b37 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -78,7 +78,7 @@ DEBUG_TOOLBAR_MONGO_STACKTRACES = False ############################################################################### # See if the developer has any local overrides. try: - from .private import * # pylint: disable=F0401 + from .private import * # pylint: disable=import-error except ImportError: pass diff --git a/common/djangoapps/student/management/tests/test_transfer_students.py b/common/djangoapps/student/management/tests/test_transfer_students.py index a0d14a93aa..4d4d6c6be0 100644 --- a/common/djangoapps/student/management/tests/test_transfer_students.py +++ b/common/djangoapps/student/management/tests/test_transfer_students.py @@ -7,7 +7,7 @@ from opaque_keys.edx import locator import unittest import ddt -from shoppingcart.models import Order, CertificateItem # pylint: disable=F0401 +from shoppingcart.models import Order, CertificateItem # pylint: disable=import-error from course_modes.models import CourseMode from student.management.commands import transfer_students from student.models import CourseEnrollment, UNENROLL_DONE, EVENT_NAME_ENROLLMENT_DEACTIVATED, \ diff --git a/common/djangoapps/third_party_auth/pipeline.py b/common/djangoapps/third_party_auth/pipeline.py index d1fd527fef..4564f5533a 100644 --- a/common/djangoapps/third_party_auth/pipeline.py +++ b/common/djangoapps/third_party_auth/pipeline.py @@ -73,8 +73,8 @@ from social.exceptions import AuthException from social.pipeline import partial import student -from shoppingcart.models import Order, PaidCourseRegistration # pylint: disable=F0401 -from shoppingcart.exceptions import ( # pylint: disable=F0401 +from shoppingcart.models import Order, PaidCourseRegistration # pylint: disable=import-error +from shoppingcart.exceptions import ( # pylint: disable=import-error CourseDoesNotExistException, ItemAlreadyInCartException, AlreadyEnrolledInCourseException diff --git a/common/djangoapps/third_party_auth/tests/test_change_enrollment.py b/common/djangoapps/third_party_auth/tests/test_change_enrollment.py index db76ff6904..f85ae38d48 100644 --- a/common/djangoapps/third_party_auth/tests/test_change_enrollment.py +++ b/common/djangoapps/third_party_auth/tests/test_change_enrollment.py @@ -5,7 +5,7 @@ import unittest import ddt import pytz from third_party_auth import pipeline -from shoppingcart.models import Order, PaidCourseRegistration # pylint: disable=F0401 +from shoppingcart.models import Order, PaidCourseRegistration # pylint: disable=import-error from social.apps.django_app import utils as social_utils from django.conf import settings from django.contrib.sessions.backends import cache diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index e4361ebacc..be978b66a0 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -159,7 +159,7 @@ SELENIUM_GRID = { ##################################################################### # See if the developer has any local overrides. try: - from .private import * # pylint: disable=F0401 + from .private import * # pylint: disable=import-error except ImportError: pass diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index b111da3499..9ccd722e08 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -81,6 +81,6 @@ YOUTUBE['TEXT_API']['url'] = "127.0.0.1:{0}/test_transcripts_youtube/".format(YO ##################################################################### # Lastly, see if the developer has any local overrides. try: - from .private import * # pylint: disable=F0401 + from .private import * # pylint: disable=import-error except ImportError: pass diff --git a/lms/envs/dev.py b/lms/envs/dev.py index 8318cc26be..5a29293915 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -308,6 +308,6 @@ REGISTRATION_CODE_LENGTH = 8 ##################################################################### # Lastly, see if the developer has any local overrides. try: - from .private import * # pylint: disable=F0401 + from .private import * # pylint: disable=import-error except ImportError: pass diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index cdd02fb329..255d180e8b 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -98,7 +98,7 @@ FEATURES['ENABLE_VIDEO_ABSTRACTION_LAYER_API'] = True ##################################################################### # See if the developer has any local overrides. try: - from .private import * # pylint: disable=F0401 + from .private import * # pylint: disable=import-error except ImportError: pass From 90624ac4ba902230b75d287cfa9e96ca9b890bba Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 01:41:09 -0500 Subject: [PATCH 17/39] s/pylint: disable=R0915/pylint: disable=too-many-statements/ --- cms/djangoapps/contentstore/git_export_utils.py | 2 +- lms/djangoapps/dashboard/git_import.py | 2 +- lms/djangoapps/instructor/views/api.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cms/djangoapps/contentstore/git_export_utils.py b/cms/djangoapps/contentstore/git_export_utils.py index 14debdbcd4..f2752737d2 100644 --- a/cms/djangoapps/contentstore/git_export_utils.py +++ b/cms/djangoapps/contentstore/git_export_utils.py @@ -65,7 +65,7 @@ def cmd_log(cmd, cwd): def export_to_git(course_id, repo, user='', rdir=None): """Export a course to git.""" - # pylint: disable=R0915 + # pylint: disable=too-many-statements if not GIT_REPO_EXPORT_DIR: raise GitExportError(GitExportError.NO_EXPORT_DIR) diff --git a/lms/djangoapps/dashboard/git_import.py b/lms/djangoapps/dashboard/git_import.py index 0e4b27bb23..d6935d2254 100644 --- a/lms/djangoapps/dashboard/git_import.py +++ b/lms/djangoapps/dashboard/git_import.py @@ -124,7 +124,7 @@ def add_repo(repo, rdir_in, branch=None): If branch is left as None, it will fetch the most recent version of the current branch. """ - # pylint: disable=R0915 + # pylint: disable=too-many-statements # Set defaults even if it isn't defined in settings mongo_db = { diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 7327a43642..428b2a45d4 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -228,7 +228,7 @@ COUNTRY_INDEX = 3 @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def register_and_enroll_students(request, course_id): # pylint: disable=R0915 +def register_and_enroll_students(request, course_id): # pylint: disable=too-many-statements """ Create new account and Enroll students in this course. Passing a csv file that contains a list of students. From e45994b2ef18d6ae27a885495be489ed04988527 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 01:43:25 -0500 Subject: [PATCH 18/39] s/pylint: disable=R0924/pylint: disable=incomplete-protocol/ --- lms/djangoapps/bulk_email/forms.py | 4 ++-- lms/djangoapps/dashboard/models.py | 2 +- lms/djangoapps/dashboard/support.py | 2 +- lms/djangoapps/survey/admin.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lms/djangoapps/bulk_email/forms.py b/lms/djangoapps/bulk_email/forms.py index 3556b274c0..49fb840560 100644 --- a/lms/djangoapps/bulk_email/forms.py +++ b/lms/djangoapps/bulk_email/forms.py @@ -17,7 +17,7 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey log = logging.getLogger(__name__) -class CourseEmailTemplateForm(forms.ModelForm): # pylint: disable=R0924 +class CourseEmailTemplateForm(forms.ModelForm): # pylint: disable=incomplete-protocol """Form providing validation of CourseEmail templates.""" name = forms.CharField(required=False) @@ -73,7 +73,7 @@ class CourseEmailTemplateForm(forms.ModelForm): # pylint: disable=R0924 return name -class CourseAuthorizationAdminForm(forms.ModelForm): # pylint: disable=R0924 +class CourseAuthorizationAdminForm(forms.ModelForm): # pylint: disable=incomplete-protocol """Input form for email enabling, allowing us to verify data.""" class Meta: # pylint: disable=missing-docstring diff --git a/lms/djangoapps/dashboard/models.py b/lms/djangoapps/dashboard/models.py index 988214287d..2fa3e17678 100644 --- a/lms/djangoapps/dashboard/models.py +++ b/lms/djangoapps/dashboard/models.py @@ -6,7 +6,7 @@ from xmodule.modulestore.mongoengine_fields import CourseKeyField class CourseImportLog(mongoengine.Document): """Mongoengine model for git log""" - # pylint: disable=R0924 + # pylint: disable=incomplete-protocol course_id = CourseKeyField(max_length=128) # NOTE: this location is not a Location object but a pathname diff --git a/lms/djangoapps/dashboard/support.py b/lms/djangoapps/dashboard/support.py index 7ec4cb6628..02fcf6d4cd 100644 --- a/lms/djangoapps/dashboard/support.py +++ b/lms/djangoapps/dashboard/support.py @@ -18,7 +18,7 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey log = logging.getLogger(__name__) -class RefundForm(forms.Form): # pylint: disable=R0924 +class RefundForm(forms.Form): # pylint: disable=incomplete-protocol """ Form for manual refunds """ diff --git a/lms/djangoapps/survey/admin.py b/lms/djangoapps/survey/admin.py index 45f30e89e3..26b0cfd71b 100644 --- a/lms/djangoapps/survey/admin.py +++ b/lms/djangoapps/survey/admin.py @@ -7,7 +7,7 @@ from django.contrib import admin from survey.models import SurveyForm -class SurveyFormAdminForm(forms.ModelForm): # pylint: disable=R0924 +class SurveyFormAdminForm(forms.ModelForm): # pylint: disable=incomplete-protocol """Form providing validation of SurveyForm content.""" class Meta: # pylint: disable=missing-docstring From c0556a7ef81b73b92a0a362c74f9a229a727cee0 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 01:49:17 -0500 Subject: [PATCH 19/39] s/pylint: disable=W0613/pylint: disable=unused-argument/ --- .../contentstore/features/component.py | 2 +- .../contentstore/features/course-export.py | 2 +- .../contentstore/features/course_import.py | 2 +- cms/djangoapps/contentstore/features/help.py | 2 +- cms/djangoapps/contentstore/features/pages.py | 2 +- cms/djangoapps/contentstore/views/dev.py | 2 +- cms/djangoapps/contentstore/views/error.py | 2 +- cms/djangoapps/contentstore/views/item.py | 2 +- .../djangoapps/course_groups/tests/helpers.py | 2 +- .../tests/test_transfer_students.py | 2 +- .../student/tests/test_microsite.py | 4 ++-- common/djangoapps/student/views.py | 2 +- common/djangoapps/terrain/browser.py | 2 +- common/djangoapps/terrain/steps.py | 2 +- .../lib/xmodule/xmodule/contentstore/mongo.py | 2 +- .../modulestore/tests/persistent_factories.py | 4 ++-- .../modulestore/tests/test_xml_importer.py | 2 +- .../tests/discussion/test_cohorts.py | 2 +- docs/en_us/developers/source/conf.py | 2 +- docs/en_us/platform_api/source/conf.py | 2 +- lms/djangoapps/bulk_email/tests/test_email.py | 2 +- lms/djangoapps/course_wiki/middleware.py | 2 +- lms/djangoapps/course_wiki/views.py | 4 ++-- lms/djangoapps/instructor/tests/test_api.py | 6 +++--- lms/djangoapps/instructor/tests/test_tools.py | 4 ++-- lms/djangoapps/instructor/views/api.py | 20 +++++++++---------- lms/djangoapps/instructor/views/coupons.py | 8 ++++---- 27 files changed, 45 insertions(+), 45 deletions(-) diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index daf73187ce..24223cbb42 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -3,7 +3,7 @@ # Lettuce formats proposed definitions for unimplemented steps with the # argument name "step" instead of "_step" and pylint does not like that. -# pylint: disable=W0613 +# pylint: disable=unused-argument from lettuce import world, step from nose.tools import assert_true, assert_in, assert_equal # pylint: disable=no-name-in-module diff --git a/cms/djangoapps/contentstore/features/course-export.py b/cms/djangoapps/contentstore/features/course-export.py index 9c8b09f5ba..a3312cc09e 100644 --- a/cms/djangoapps/contentstore/features/course-export.py +++ b/cms/djangoapps/contentstore/features/course-export.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring # pylint: disable=redefined-outer-name -# pylint: disable=W0613 +# pylint: disable=unused-argument from lettuce import world, step from component_settings_editor_helpers import enter_xml_in_advanced_problem diff --git a/cms/djangoapps/contentstore/features/course_import.py b/cms/djangoapps/contentstore/features/course_import.py index 80365d3884..c8293c5d11 100644 --- a/cms/djangoapps/contentstore/features/course_import.py +++ b/cms/djangoapps/contentstore/features/course_import.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring # pylint: disable=redefined-outer-name -# pylint: disable=W0613 +# pylint: disable=unused-argument import os from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/help.py b/cms/djangoapps/contentstore/features/help.py index 25ad14aa99..f169e72057 100644 --- a/cms/djangoapps/contentstore/features/help.py +++ b/cms/djangoapps/contentstore/features/help.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring # pylint: disable=redefined-outer-name -# pylint: disable=W0613 +# pylint: disable=unused-argument from nose.tools import assert_false # pylint: disable=no-name-in-module from lettuce import step, world diff --git a/cms/djangoapps/contentstore/features/pages.py b/cms/djangoapps/contentstore/features/pages.py index 0c6c89844d..5558f20390 100644 --- a/cms/djangoapps/contentstore/features/pages.py +++ b/cms/djangoapps/contentstore/features/pages.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring # pylint: disable=redefined-outer-name -# pylint: disable=W0613 +# pylint: disable=unused-argument from lettuce import world, step from nose.tools import assert_equal, assert_in # pylint: disable=no-name-in-module diff --git a/cms/djangoapps/contentstore/views/dev.py b/cms/djangoapps/contentstore/views/dev.py index 2a6ee3ae07..dd03998c30 100644 --- a/cms/djangoapps/contentstore/views/dev.py +++ b/cms/djangoapps/contentstore/views/dev.py @@ -3,7 +3,7 @@ Views that are only activated when the project is running in development mode. These views will NOT be shown on production: trying to access them will result in a 404 error. """ -# pylint: disable=W0613 +# pylint: disable=unused-argument from edxmako.shortcuts import render_to_response from mako.exceptions import TopLevelLookupException from django.http import HttpResponseNotFound diff --git a/cms/djangoapps/contentstore/views/error.py b/cms/djangoapps/contentstore/views/error.py index 2400d63b66..c67a559175 100644 --- a/cms/djangoapps/contentstore/views/error.py +++ b/cms/djangoapps/contentstore/views/error.py @@ -1,4 +1,4 @@ -# pylint: disable=missing-docstring,W0613 +# pylint: disable=missing-docstring,unused-argument from django.http import (HttpResponse, HttpResponseServerError, HttpResponseNotFound) diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index e09db7a4e4..d80b334269 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -585,7 +585,7 @@ def _delete_item(usage_key, user): store.delete_item(usage_key, user.id) -# pylint: disable=W0613 +# pylint: disable=unused-argument @login_required @require_http_methods(("GET", "DELETE")) def orphan_handler(request, course_key_string): diff --git a/common/djangoapps/course_groups/tests/helpers.py b/common/djangoapps/course_groups/tests/helpers.py index 94925132e3..cd7b6c9eee 100644 --- a/common/djangoapps/course_groups/tests/helpers.py +++ b/common/djangoapps/course_groups/tests/helpers.py @@ -20,7 +20,7 @@ class CohortFactory(DjangoModelFactory): group_type = CourseUserGroup.COHORT @post_generation - def users(self, create, extracted, **kwargs): # pylint: disable=W0613 + def users(self, create, extracted, **kwargs): # pylint: disable=unused-argument """ Returns the users associated with the cohort. """ diff --git a/common/djangoapps/student/management/tests/test_transfer_students.py b/common/djangoapps/student/management/tests/test_transfer_students.py index 4d4d6c6be0..89be5f167f 100644 --- a/common/djangoapps/student/management/tests/test_transfer_students.py +++ b/common/djangoapps/student/management/tests/test_transfer_students.py @@ -36,7 +36,7 @@ class TestTransferStudents(ModuleStoreTestCase): """Disconnects the UNENROLL stub receiver.""" UNENROLL_DONE.disconnect(self.assert_unenroll_signal) - def assert_unenroll_signal(self, skip_refund=False, **kwargs): # pylint: disable=W0613 + def assert_unenroll_signal(self, skip_refund=False, **kwargs): # pylint: disable=unused-argument """ Signal Receiver stub for testing that the unenroll signal was fired. """ self.assertFalse(self.signal_fired) self.assertTrue(skip_refund) diff --git a/common/djangoapps/student/tests/test_microsite.py b/common/djangoapps/student/tests/test_microsite.py index 4574c429a8..4564647302 100644 --- a/common/djangoapps/student/tests/test_microsite.py +++ b/common/djangoapps/student/tests/test_microsite.py @@ -26,7 +26,7 @@ FAKE_MICROSITE = { } -def fake_site_name(name, default=None): # pylint: disable=W0613 +def fake_site_name(name, default=None): # pylint: disable=unused-argument """ create a fake microsite site name """ @@ -36,7 +36,7 @@ def fake_site_name(name, default=None): # pylint: disable=W0613 return default -def fake_microsite_get_value(name, default=None): # pylint: disable=W0613 +def fake_microsite_get_value(name, default=None): # pylint: disable=unused-argument """ create a fake microsite site name """ diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index f48651f5d3..3ac08d4d6f 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -1268,7 +1268,7 @@ class AccountValidationError(Exception): @receiver(post_save, sender=User) -def user_signup_handler(sender, **kwargs): # pylint: disable=W0613 +def user_signup_handler(sender, **kwargs): # pylint: disable=unused-argument """ handler that saves the user Signup Source when the user is created diff --git a/common/djangoapps/terrain/browser.py b/common/djangoapps/terrain/browser.py index 8e74ccd5a1..e603c90b02 100644 --- a/common/djangoapps/terrain/browser.py +++ b/common/djangoapps/terrain/browser.py @@ -3,7 +3,7 @@ Browser set up for acceptance tests. """ # pylint: disable=no-member -# pylint: disable=W0613 +# pylint: disable=unused-argument from lettuce import before, after, world from splinter.browser import Browser diff --git a/common/djangoapps/terrain/steps.py b/common/djangoapps/terrain/steps.py index f8b6daef34..3fc7115237 100644 --- a/common/djangoapps/terrain/steps.py +++ b/common/djangoapps/terrain/steps.py @@ -9,7 +9,7 @@ # pylint: disable=W0614 # Disable the "unused argument" warning because lettuce uses "step" -# pylint: disable=W0613 +# pylint: disable=unused-argument # django_url is assigned late in the process of loading lettuce, # so we import this as a module, and then read django_url from diff --git a/common/lib/xmodule/xmodule/contentstore/mongo.py b/common/lib/xmodule/xmodule/contentstore/mongo.py index aad0c57d19..08b77132d5 100644 --- a/common/lib/xmodule/xmodule/contentstore/mongo.py +++ b/common/lib/xmodule/xmodule/contentstore/mongo.py @@ -18,7 +18,7 @@ from xmodule.modulestore.django import ASSET_IGNORE_REGEX class MongoContentStore(ContentStore): - # pylint: disable=W0613 + # pylint: disable=unused-argument def __init__(self, host, db, port=27017, user=None, password=None, bucket='fs', collection=None, **kwargs): """ Establish the connection with the mongo backend and connect to the collections diff --git a/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py b/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py index a98400ee4a..9fe356a20a 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py @@ -35,7 +35,7 @@ class PersistentCourseFactory(SplitFactory): """ FACTORY_FOR = CourseDescriptor - # pylint: disable=W0613 + # pylint: disable=unused-argument @classmethod def _create(cls, target_class, course='999', run='run', org='testX', user_id=ModuleStoreEnum.UserID.test, master_branch=ModuleStoreEnum.BranchName.draft, **kwargs): @@ -60,7 +60,7 @@ class ItemFactory(SplitFactory): display_name = factory.LazyAttributeSequence(lambda o, n: "{} {}".format(o.category, n)) - # pylint: disable=W0613 + # pylint: disable=unused-argument @classmethod def _create(cls, target_class, parent_location, category='chapter', user_id=ModuleStoreEnum.UserID.test, definition_locator=None, force=False, diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py b/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py index e98095b596..4260d849a4 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py @@ -95,7 +95,7 @@ def modulestore(): return ModuleStoreNoSettings.modulestore -# pylint: disable=W0613 +# pylint: disable=unused-argument def render_to_template_mock(*args): pass diff --git a/common/test/acceptance/tests/discussion/test_cohorts.py b/common/test/acceptance/tests/discussion/test_cohorts.py index 482a35e34d..5c2a2e9351 100644 --- a/common/test/acceptance/tests/discussion/test_cohorts.py +++ b/common/test/acceptance/tests/discussion/test_cohorts.py @@ -73,7 +73,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest): self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint:disable=W0201 self.thread_page.visit() - # pylint:disable=W0613 + # pylint: disable=unused-argument def refresh_thread_page(self, thread_id): self.browser.refresh() self.thread_page.wait_for_page() diff --git a/docs/en_us/developers/source/conf.py b/docs/en_us/developers/source/conf.py index 37e26e20a9..ff60da07dd 100644 --- a/docs/en_us/developers/source/conf.py +++ b/docs/en_us/developers/source/conf.py @@ -2,7 +2,7 @@ # pylint: disable=invalid-name # pylint: disable=W0622 # pylint: disable=W0212 -# pylint: disable=W0613 +# pylint: disable=unused-argument import os from path import path diff --git a/docs/en_us/platform_api/source/conf.py b/docs/en_us/platform_api/source/conf.py index 52d901bde8..0836542763 100644 --- a/docs/en_us/platform_api/source/conf.py +++ b/docs/en_us/platform_api/source/conf.py @@ -2,7 +2,7 @@ # pylint: disable=invalid-name # pylint: disable=W0622 # pylint: disable=W0212 -# pylint: disable=W0613 +# pylint: disable=unused-argument import os from path import path diff --git a/lms/djangoapps/bulk_email/tests/test_email.py b/lms/djangoapps/bulk_email/tests/test_email.py index 560d2c431d..0231449ceb 100644 --- a/lms/djangoapps/bulk_email/tests/test_email.py +++ b/lms/djangoapps/bulk_email/tests/test_email.py @@ -37,7 +37,7 @@ class MockCourseEmailResult(object): def get_mock_update_subtask_status(self): """Wrapper for mock email function.""" - def mock_update_subtask_status(entry_id, current_task_id, new_subtask_status): # pylint: disable=W0613 + def mock_update_subtask_status(entry_id, current_task_id, new_subtask_status): # pylint: disable=unused-argument """Increments count of number of emails sent.""" self.emails_sent += new_subtask_status.succeeded return update_subtask_status(entry_id, current_task_id, new_subtask_status) diff --git a/lms/djangoapps/course_wiki/middleware.py b/lms/djangoapps/course_wiki/middleware.py index 0d276e1cfc..355d4d9f8b 100644 --- a/lms/djangoapps/course_wiki/middleware.py +++ b/lms/djangoapps/course_wiki/middleware.py @@ -35,7 +35,7 @@ class WikiAccessMiddleware(object): # Even though we came from the course, we can't see it. So don't worry about it. pass - def process_view(self, request, view_func, view_args, view_kwargs): # pylint: disable=W0613 + def process_view(self, request, view_func, view_args, view_kwargs): # pylint: disable=unused-argument """ This function handles authentication logic for wiki urls and redirects from the "root wiki" to the "course wiki" if the user accesses the wiki from a course url diff --git a/lms/djangoapps/course_wiki/views.py b/lms/djangoapps/course_wiki/views.py index f07b8d10c4..3bcdfa1fe6 100644 --- a/lms/djangoapps/course_wiki/views.py +++ b/lms/djangoapps/course_wiki/views.py @@ -21,7 +21,7 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey log = logging.getLogger(__name__) -def root_create(request): # pylint: disable=W0613 +def root_create(request): # pylint: disable=unused-argument """ In the edX wiki, we don't show the root_create view. Instead, we just create the root automatically if it doesn't exist. @@ -30,7 +30,7 @@ def root_create(request): # pylint: disable=W0613 return redirect('wiki:get', path=root.path) -def course_wiki_redirect(request, course_id): # pylint: disable=W0613 +def course_wiki_redirect(request, course_id): # pylint: disable=unused-argument """ This redirects to whatever page on the wiki that the course designates as it's home page. A course's wiki must be an article on the root (for diff --git a/lms/djangoapps/instructor/tests/test_api.py b/lms/djangoapps/instructor/tests/test_api.py index 55c7ad3e57..c2fc7c465e 100644 --- a/lms/djangoapps/instructor/tests/test_api.py +++ b/lms/djangoapps/instructor/tests/test_api.py @@ -79,19 +79,19 @@ REPORTS_DATA = ( @common_exceptions_400 -def view_success(request): # pylint: disable=W0613 +def view_success(request): # pylint: disable=unused-argument "A dummy view for testing that returns a simple HTTP response" return HttpResponse('success') @common_exceptions_400 -def view_user_doesnotexist(request): # pylint: disable=W0613 +def view_user_doesnotexist(request): # pylint: disable=unused-argument "A dummy view that raises a User.DoesNotExist exception" raise User.DoesNotExist() @common_exceptions_400 -def view_alreadyrunningerror(request): # pylint: disable=W0613 +def view_alreadyrunningerror(request): # pylint: disable=unused-argument "A dummy view that raises an AlreadyRunningError exception" raise AlreadyRunningError() diff --git a/lms/djangoapps/instructor/tests/test_tools.py b/lms/djangoapps/instructor/tests/test_tools.py index edebd19c40..b8cdc0b7bd 100644 --- a/lms/djangoapps/instructor/tests/test_tools.py +++ b/lms/djangoapps/instructor/tests/test_tools.py @@ -39,7 +39,7 @@ class TestHandleDashboardError(unittest.TestCase): Test handle_dashboard_error decorator. """ def test_error(self): - # pylint: disable=W0613 + # pylint: disable=unused-argument @tools.handle_dashboard_error def view(request, course_id): """ @@ -51,7 +51,7 @@ class TestHandleDashboardError(unittest.TestCase): self.assertEqual(response, {'error': 'Oh noes!'}) def test_no_error(self): - # pylint: disable=W0613 + # pylint: disable=unused-argument @tools.handle_dashboard_error def view(request, course_id): """ diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 428b2a45d4..ffcb49a889 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -747,7 +747,7 @@ def get_grading_config(request, course_id): @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_sale_records(request, course_id, csv=False): # pylint: disable=W0613, redefined-outer-name +def get_sale_records(request, course_id, csv=False): # pylint: disable=unused-argument, redefined-outer-name """ return the summary of all sales records for a particular course """ @@ -778,7 +778,7 @@ def get_sale_records(request, course_id, csv=False): # pylint: disable=W0613, r @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_sale_order_records(request, course_id): # pylint: disable=W0613, redefined-outer-name +def get_sale_order_records(request, course_id): # pylint: disable=unused-argument, redefined-outer-name """ return the summary of all sales records for a particular course """ @@ -878,7 +878,7 @@ def re_validate_invoice(obj_invoice): @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_purchase_transaction(request, course_id, csv=False): # pylint: disable=W0613, redefined-outer-name +def get_purchase_transaction(request, course_id, csv=False): # pylint: disable=unused-argument, redefined-outer-name """ return the summary of all purchased transactions for a particular course """ @@ -906,7 +906,7 @@ def get_purchase_transaction(request, course_id, csv=False): # pylint: disable= @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_students_features(request, course_id, csv=False): # pylint: disable=W0613, redefined-outer-name +def get_students_features(request, course_id, csv=False): # pylint: disable=redefined-outer-name """ Respond with json which contains a summary of all enrolled students profile information. @@ -976,7 +976,7 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=W06 @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_coupon_codes(request, course_id): # pylint: disable=W0613 +def get_coupon_codes(request, course_id): # pylint: disable=unused-argument """ Respond with csv which contains a summary of all Active Coupons. """ @@ -1044,7 +1044,7 @@ def random_code_generator(): @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @require_POST -def get_registration_codes(request, course_id): # pylint: disable=W0613 +def get_registration_codes(request, course_id): # pylint: disable=unused-argument """ Respond with csv which contains a summary of all Registration Codes. """ @@ -1181,7 +1181,7 @@ def generate_registration_codes(request, course_id): @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @require_POST -def active_registration_codes(request, course_id): # pylint: disable=W0613 +def active_registration_codes(request, course_id): # pylint: disable=unused-argument """ Respond with csv which contains a summary of all Active Registration Codes. """ @@ -1208,7 +1208,7 @@ def active_registration_codes(request, course_id): # pylint: disable=W0613 @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @require_POST -def spent_registration_codes(request, course_id): # pylint: disable=W0613 +def spent_registration_codes(request, course_id): # pylint: disable=unused-argument """ Respond with csv which contains a summary of all Spent(used) Registration Codes. """ @@ -1238,7 +1238,7 @@ def spent_registration_codes(request, course_id): # pylint: disable=W0613 @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_anon_ids(request, course_id): # pylint: disable=W0613 +def get_anon_ids(request, course_id): # pylint: disable=unused-argument """ Respond with 2-column CSV output of user-id, anonymized-user-id """ @@ -1839,7 +1839,7 @@ def proxy_legacy_analytics(request, course_id): @require_POST -def get_user_invoice_preference(request, course_id): # pylint: disable=W0613 +def get_user_invoice_preference(request, course_id): # pylint: disable=unused-argument """ Gets invoice copy user's preferences. """ diff --git a/lms/djangoapps/instructor/views/coupons.py b/lms/djangoapps/instructor/views/coupons.py index c4ec58d9d2..d18eb1c1d3 100644 --- a/lms/djangoapps/instructor/views/coupons.py +++ b/lms/djangoapps/instructor/views/coupons.py @@ -18,7 +18,7 @@ log = logging.getLogger(__name__) @require_POST @login_required -def remove_coupon(request, course_id): # pylint: disable=W0613 +def remove_coupon(request, course_id): # pylint: disable=unused-argument """ remove the coupon against the coupon id set the coupon is_active flag to false @@ -48,7 +48,7 @@ def remove_coupon(request, course_id): # pylint: disable=W0613 @require_POST @login_required -def add_coupon(request, course_id): # pylint: disable=W0613 +def add_coupon(request, course_id): # pylint: disable=unused-argument """ add coupon in the Coupons Table """ @@ -96,7 +96,7 @@ def add_coupon(request, course_id): # pylint: disable=W0613 @require_POST @login_required -def update_coupon(request, course_id): # pylint: disable=W0613 +def update_coupon(request, course_id): # pylint: disable=unused-argument """ update the coupon object in the database """ @@ -121,7 +121,7 @@ def update_coupon(request, course_id): # pylint: disable=W0613 @require_POST @login_required -def get_coupon_info(request, course_id): # pylint: disable=W0613 +def get_coupon_info(request, course_id): # pylint: disable=unused-argument """ get the coupon information to display in the pop up form """ From c54a71feb59ca1541b1b50a75c3b1d44bc0a17e6 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 01:51:56 -0500 Subject: [PATCH 20/39] s/pylint:disable/pylint: disable/ (formatting fix) --- common/djangoapps/third_party_auth/tests/specs/base.py | 6 +++--- common/djangoapps/user_api/models.py | 2 +- common/test/acceptance/tests/discussion/test_cohorts.py | 4 ++-- common/test/acceptance/tests/discussion/test_discussion.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/djangoapps/third_party_auth/tests/specs/base.py b/common/djangoapps/third_party_auth/tests/specs/base.py index da29b9b9a3..3c34754931 100644 --- a/common/djangoapps/third_party_auth/tests/specs/base.py +++ b/common/djangoapps/third_party_auth/tests/specs/base.py @@ -654,7 +654,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase): pipeline.get_login_url(self.PROVIDER_CLASS.NAME, pipeline.AUTH_ENTRY_LOGIN))) # Next, the provider makes a request against /auth/complete/. - # pylint:disable-msg=protected-access + # pylint: disable-msg=protected-access self.assert_redirect_to_register_looks_correct(actions.do_complete(strategy, social_views._do_login)) mako_middleware_process_request(strategy.request) @@ -716,7 +716,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase): # assignment via pipeline to make sure a distinct username is created. strategy.storage.user.create_user(username=self.get_username(), email='user@email.com', password='password') strategy.backend.auth_complete = mock.MagicMock(return_value=self.fake_auth_complete(strategy)) - # pylint:disable-msg=protected-access + # pylint: disable-msg=protected-access self.assert_redirect_to_register_looks_correct(actions.do_complete(strategy, social_views._do_login)) distinct_username = pipeline.get(request)['kwargs']['username'] self.assertNotEqual(original_username, distinct_username) @@ -725,7 +725,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase): request, strategy = self.get_request_and_strategy( auth_entry=pipeline.AUTH_ENTRY_REGISTER, redirect_uri='social:complete') strategy.backend.auth_complete = mock.MagicMock(return_value=self.fake_auth_complete(strategy)) - # pylint:disable-msg=protected-access + # pylint: disable-msg=protected-access self.assert_redirect_to_register_looks_correct(actions.do_complete(strategy, social_views._do_login)) mako_middleware_process_request(strategy.request) diff --git a/common/djangoapps/user_api/models.py b/common/djangoapps/user_api/models.py index b9675c83c5..e71437214b 100644 --- a/common/djangoapps/user_api/models.py +++ b/common/djangoapps/user_api/models.py @@ -11,7 +11,7 @@ from xmodule_django.models import CourseKeyField # but currently the rest of the system assumes that "student" defines # certain models. For now we will leave the models in "student" and # create an alias in "user_api". -from student.models import UserProfile, Registration, PendingEmailChange # pylint:disable=unused-import +from student.models import UserProfile, Registration, PendingEmailChange # pylint: disable=unused-import class UserPreference(models.Model): diff --git a/common/test/acceptance/tests/discussion/test_cohorts.py b/common/test/acceptance/tests/discussion/test_cohorts.py index 5c2a2e9351..d63afd00e1 100644 --- a/common/test/acceptance/tests/discussion/test_cohorts.py +++ b/common/test/acceptance/tests/discussion/test_cohorts.py @@ -70,7 +70,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest): AutoAuthPage(self.browser, course_id=self.course_id).visit() def setup_thread_page(self, thread_id): - self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint:disable=W0201 + self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint: disable=W0201 self.thread_page.visit() # pylint: disable=unused-argument @@ -129,7 +129,7 @@ class InlineDiscussionTest(UniqueCourseTest): discussion_page = InlineDiscussionPage(self.browser, self.discussion_id) discussion_page.expand_discussion() self.assertEqual(discussion_page.get_num_displayed_threads(), 1) - self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint:disable=W0201 + self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint: disable=W0201 self.thread_page.expand() def refresh_thread_page(self, thread_id): diff --git a/common/test/acceptance/tests/discussion/test_discussion.py b/common/test/acceptance/tests/discussion/test_discussion.py index c4dae8872a..8b2c887ed2 100644 --- a/common/test/acceptance/tests/discussion/test_discussion.py +++ b/common/test/acceptance/tests/discussion/test_discussion.py @@ -127,7 +127,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest, DiscussionResponsePaginati AutoAuthPage(self.browser, course_id=self.course_id).visit() def setup_thread_page(self, thread_id): - self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint:disable=W0201 + self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint: disable=W0201 self.thread_page.visit() def test_marked_answer_comments(self): @@ -318,7 +318,7 @@ class InlineDiscussionTest(UniqueCourseTest, DiscussionResponsePaginationTestMix def setup_thread_page(self, thread_id): self.discussion_page.expand_discussion() self.assertEqual(self.discussion_page.get_num_displayed_threads(), 1) - self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint:disable=W0201 + self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint: disable=W0201 self.thread_page.expand() def test_initial_render(self): From f223ac8404cffbb1517ed5c1a938c7fe21692560 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 01:57:48 -0500 Subject: [PATCH 21/39] s/pylint: disable=W0401/pylint: disable=wildcard-import/ --- cms/djangoapps/contentstore/views/__init__.py | 2 +- cms/envs/acceptance.py | 2 +- cms/envs/aws.py | 2 +- cms/envs/aws_migrate.py | 2 +- cms/envs/bok_choy.py | 2 +- cms/envs/common.py | 2 +- cms/envs/debug_upload.py | 4 ++-- cms/envs/dev.py | 2 +- cms/envs/dev_dbperf.py | 2 +- cms/envs/dev_ike.py | 2 +- cms/envs/dev_shared_preview.py | 2 +- cms/envs/dev_with_worker.py | 2 +- cms/envs/microsite_test.py | 2 +- cms/envs/test.py | 2 +- common/djangoapps/terrain/__init__.py | 8 ++++---- common/djangoapps/terrain/steps.py | 2 +- common/lib/xmodule/xmodule/video_module/__init__.py | 2 +- lms/envs/acceptance.py | 2 +- lms/envs/aws.py | 2 +- lms/envs/aws_migrate.py | 2 +- lms/envs/bok_choy.py | 2 +- lms/envs/cms/aws.py | 2 +- lms/envs/cms/dev.py | 2 +- lms/envs/cms/microsite_test.py | 2 +- lms/envs/common.py | 3 ++- lms/envs/content.py | 2 +- lms/envs/dev.py | 2 +- lms/envs/dev_ike.py | 2 +- lms/envs/dev_int.py | 2 +- lms/envs/dev_with_worker.py | 2 +- lms/envs/devgroups/courses.py | 2 +- lms/envs/devgroups/h_cs50.py | 2 +- lms/envs/devgroups/m_6002.py | 2 +- lms/envs/devgroups/portal.py | 2 +- lms/envs/edx4edx_aws.py | 2 +- lms/envs/load_test.py | 2 +- lms/envs/sauce.py | 2 +- lms/envs/static.py | 2 +- lms/envs/test.py | 2 +- 39 files changed, 44 insertions(+), 43 deletions(-) diff --git a/cms/djangoapps/contentstore/views/__init__.py b/cms/djangoapps/contentstore/views/__init__.py index 5e644468fd..d55180eaf5 100644 --- a/cms/djangoapps/contentstore/views/__init__.py +++ b/cms/djangoapps/contentstore/views/__init__.py @@ -1,4 +1,4 @@ -# pylint: disable=W0401, W0511 +# pylint: disable=wildcard-import, W0511 "All view functions for contentstore, broken out into submodules" diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index 0df379aa54..d8fb8a606b 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -5,7 +5,7 @@ so that we can run the lettuce acceptance tests. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .test import * from lms.envs.sauce import * diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 2c6b730833..b43a00254a 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -4,7 +4,7 @@ This is the default template for our main set of AWS servers. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 import json diff --git a/cms/envs/aws_migrate.py b/cms/envs/aws_migrate.py index a8617d2fa0..7986d929fa 100644 --- a/cms/envs/aws_migrate.py +++ b/cms/envs/aws_migrate.py @@ -6,7 +6,7 @@ LMS with enough privileges to modify the database schema. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 # Import everything from .aws so that our settings are based on those. from .aws import * diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index 7353253456..6eab6cd22d 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -15,7 +15,7 @@ from path import path os.environ['SERVICE_VARIANT'] = 'bok_choy' os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() # pylint: disable=no-value-for-parameter -from .aws import * # pylint: disable=W0401, W0614 +from .aws import * # pylint: disable=wildcard-import, W0614 ######################### Testing overrides #################################### diff --git a/cms/envs/common.py b/cms/envs/common.py index 8c2c38028b..1fc2423825 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -22,7 +22,7 @@ Longer TODO: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0611, W0614 +# pylint: disable=wildcard-import, W0611, W0614 import imp import os diff --git a/cms/envs/debug_upload.py b/cms/envs/debug_upload.py index c854d9c933..f4ef6aab8a 100644 --- a/cms/envs/debug_upload.py +++ b/cms/envs/debug_upload.py @@ -2,8 +2,8 @@ A new cms ENV configuration to use a slow upload file handler to help test progress bars in uploads """ -# pylint: disable=W0614, W0401 -from .dev import * +# pylint: disable=W0614 +from .dev import * # pylint: disable=wildcard-import FILE_UPLOAD_HANDLERS = ( 'contentstore.debug_file_uploader.DebugFileUploader', diff --git a/cms/envs/dev.py b/cms/envs/dev.py index f0aa0fc006..5bfbc0048d 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -3,7 +3,7 @@ This config file runs the simplest dev environment""" # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .common import * from logsettings import get_logger_config diff --git a/cms/envs/dev_dbperf.py b/cms/envs/dev_dbperf.py index 2ea131b69e..9942280ba1 100644 --- a/cms/envs/dev_dbperf.py +++ b/cms/envs/dev_dbperf.py @@ -4,7 +4,7 @@ This configuration is to turn on the Django Toolbar stats for DB access stats, f # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .dev import * diff --git a/cms/envs/dev_ike.py b/cms/envs/dev_ike.py index 108a36510a..13d474a59b 100644 --- a/cms/envs/dev_ike.py +++ b/cms/envs/dev_ike.py @@ -1,6 +1,6 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 # dev environment for ichuang/mit diff --git a/cms/envs/dev_shared_preview.py b/cms/envs/dev_shared_preview.py index ec488a68ba..cf5e021ac8 100644 --- a/cms/envs/dev_shared_preview.py +++ b/cms/envs/dev_shared_preview.py @@ -5,7 +5,7 @@ the same process between preview and published # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .dev import * diff --git a/cms/envs/dev_with_worker.py b/cms/envs/dev_with_worker.py index 078567c493..cac84cb099 100644 --- a/cms/envs/dev_with_worker.py +++ b/cms/envs/dev_with_worker.py @@ -10,7 +10,7 @@ django_admin.py celery worker # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from dev import * diff --git a/cms/envs/microsite_test.py b/cms/envs/microsite_test.py index b79e295226..724ca277f3 100644 --- a/cms/envs/microsite_test.py +++ b/cms/envs/microsite_test.py @@ -3,7 +3,7 @@ This is a localdev test for the Microsite processing pipeline """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .dev import * diff --git a/cms/envs/test.py b/cms/envs/test.py index 36b9e54e29..e8e4e7d80e 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -10,7 +10,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .common import * import os diff --git a/common/djangoapps/terrain/__init__.py b/common/djangoapps/terrain/__init__.py index ee3c154101..a99980ec95 100644 --- a/common/djangoapps/terrain/__init__.py +++ b/common/djangoapps/terrain/__init__.py @@ -2,7 +2,7 @@ # across all lms apps can be put in terrain/common # See https://groups.google.com/forum/?fromgroups=#!msg/lettuce-users/5VyU9B4HcX8/USgbGIJdS5QJ -from terrain.browser import * # pylint: disable=W0401 -from terrain.steps import * # pylint: disable=W0401 -from terrain.factories import * # pylint: disable=W0401 -from terrain.setup_prereqs import * # pylint: disable=W0401 +from terrain.browser import * # pylint: disable=wildcard-import +from terrain.steps import * # pylint: disable=wildcard-import +from terrain.factories import * # pylint: disable=wildcard-import +from terrain.setup_prereqs import * # pylint: disable=wildcard-import diff --git a/common/djangoapps/terrain/steps.py b/common/djangoapps/terrain/steps.py index 3fc7115237..ced2aa6780 100644 --- a/common/djangoapps/terrain/steps.py +++ b/common/djangoapps/terrain/steps.py @@ -3,7 +3,7 @@ # Disable the "wildcard import" warning so we can bring in all methods from # course helpers and ui helpers -# pylint: disable=W0401 +# pylint: disable=wildcard-import # Disable the "Unused import %s from wildcard import" warning # pylint: disable=W0614 diff --git a/common/lib/xmodule/xmodule/video_module/__init__.py b/common/lib/xmodule/xmodule/video_module/__init__.py index 3fba59844a..9aa96ecee9 100644 --- a/common/lib/xmodule/xmodule/video_module/__init__.py +++ b/common/lib/xmodule/xmodule/video_module/__init__.py @@ -3,7 +3,7 @@ Container for video module and it's utils. """ # Disable wildcard-import warnings. -# pylint: disable=W0401 +# pylint: disable=wildcard-import from .transcripts_utils import * from .video_utils import * diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index be978b66a0..6a3e6ddf7a 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -5,7 +5,7 @@ so that we can run the lettuce acceptance tests. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .test import * from .sauce import * diff --git a/lms/envs/aws.py b/lms/envs/aws.py index b6f351c9bb..eb5e4b4dca 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -9,7 +9,7 @@ Common traits: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 import json diff --git a/lms/envs/aws_migrate.py b/lms/envs/aws_migrate.py index a8617d2fa0..7986d929fa 100644 --- a/lms/envs/aws_migrate.py +++ b/lms/envs/aws_migrate.py @@ -6,7 +6,7 @@ LMS with enough privileges to modify the database schema. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 # Import everything from .aws so that our settings are based on those. from .aws import * diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index 9ccd722e08..3974a9619d 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -18,7 +18,7 @@ TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" os.environ['SERVICE_VARIANT'] = 'bok_choy' os.environ['CONFIG_ROOT'] = CONFIG_ROOT -from .aws import * # pylint: disable=W0401, W0614 +from .aws import * # pylint: disable=wildcard-import, W0614 ######################### Testing overrides #################################### diff --git a/lms/envs/cms/aws.py b/lms/envs/cms/aws.py index baeaebca1c..d16408afcf 100644 --- a/lms/envs/cms/aws.py +++ b/lms/envs/cms/aws.py @@ -4,7 +4,7 @@ Settings for the LMS that runs alongside the CMS on AWS # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from ..aws import * diff --git a/lms/envs/cms/dev.py b/lms/envs/cms/dev.py index 260d9e269a..622ff1e709 100644 --- a/lms/envs/cms/dev.py +++ b/lms/envs/cms/dev.py @@ -4,7 +4,7 @@ Settings for the LMS that runs alongside the CMS on AWS # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from ..dev import * diff --git a/lms/envs/cms/microsite_test.py b/lms/envs/cms/microsite_test.py index 09ea6aa3dd..15ed0a535a 100644 --- a/lms/envs/cms/microsite_test.py +++ b/lms/envs/cms/microsite_test.py @@ -3,7 +3,7 @@ This is a localdev test for the Microsite processing pipeline """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .dev import * from ..dev import ENV_ROOT, FEATURES diff --git a/lms/envs/common.py b/lms/envs/common.py index 850809dc64..dc02a16ad1 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -22,7 +22,8 @@ Longer TODO: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0611, W0614, invalid-name +# pylint: disable=wildcard-import, W0611, W0614, invalid-name + import sys import os diff --git a/lms/envs/content.py b/lms/envs/content.py index e00ad4d7f3..1606e7e9a8 100644 --- a/lms/envs/content.py +++ b/lms/envs/content.py @@ -5,7 +5,7 @@ between dev machines and AWS machines. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .aws import * diff --git a/lms/envs/dev.py b/lms/envs/dev.py index 5a29293915..77cdb69113 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -10,7 +10,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .common import * from logsettings import get_logger_config diff --git a/lms/envs/dev_ike.py b/lms/envs/dev_ike.py index 92dac61765..f39911f144 100644 --- a/lms/envs/dev_ike.py +++ b/lms/envs/dev_ike.py @@ -10,7 +10,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .common import * from .dev import * diff --git a/lms/envs/dev_int.py b/lms/envs/dev_int.py index c66bdb47d2..15367119e2 100644 --- a/lms/envs/dev_int.py +++ b/lms/envs/dev_int.py @@ -12,7 +12,7 @@ use *.dev domains instead for local testing. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .dev import * diff --git a/lms/envs/dev_with_worker.py b/lms/envs/dev_with_worker.py index 078567c493..cac84cb099 100644 --- a/lms/envs/dev_with_worker.py +++ b/lms/envs/dev_with_worker.py @@ -10,7 +10,7 @@ django_admin.py celery worker # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from dev import * diff --git a/lms/envs/devgroups/courses.py b/lms/envs/devgroups/courses.py index d353c87dec..d170f372e7 100644 --- a/lms/envs/devgroups/courses.py +++ b/lms/envs/devgroups/courses.py @@ -1,7 +1,7 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from ..dev import * diff --git a/lms/envs/devgroups/h_cs50.py b/lms/envs/devgroups/h_cs50.py index 21c959f5ce..a82f3f90e2 100644 --- a/lms/envs/devgroups/h_cs50.py +++ b/lms/envs/devgroups/h_cs50.py @@ -1,7 +1,7 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .courses import * diff --git a/lms/envs/devgroups/m_6002.py b/lms/envs/devgroups/m_6002.py index d3c10fcd04..eb96cdda8b 100644 --- a/lms/envs/devgroups/m_6002.py +++ b/lms/envs/devgroups/m_6002.py @@ -1,7 +1,7 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .courses import * diff --git a/lms/envs/devgroups/portal.py b/lms/envs/devgroups/portal.py index 8e4635cc66..f8c1d015b6 100644 --- a/lms/envs/devgroups/portal.py +++ b/lms/envs/devgroups/portal.py @@ -5,7 +5,7 @@ get shared sessions) # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from courses import * diff --git a/lms/envs/edx4edx_aws.py b/lms/envs/edx4edx_aws.py index af60e906f8..151a6556d3 100644 --- a/lms/envs/edx4edx_aws.py +++ b/lms/envs/edx4edx_aws.py @@ -1,6 +1,6 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 # Settings for edx4edx production instance from .aws import * diff --git a/lms/envs/load_test.py b/lms/envs/load_test.py index f23ddbe066..b81ee45587 100644 --- a/lms/envs/load_test.py +++ b/lms/envs/load_test.py @@ -4,7 +4,7 @@ Settings for load testing. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .aws import * diff --git a/lms/envs/sauce.py b/lms/envs/sauce.py index 0ab56a1004..80ca002c74 100644 --- a/lms/envs/sauce.py +++ b/lms/envs/sauce.py @@ -5,7 +5,7 @@ so that we can run the lettuce acceptance tests on SauceLabs. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import os diff --git a/lms/envs/static.py b/lms/envs/static.py index ce3d8d610f..8c13f7daea 100644 --- a/lms/envs/static.py +++ b/lms/envs/static.py @@ -10,7 +10,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .common import * from logsettings import get_logger_config diff --git a/lms/envs/test.py b/lms/envs/test.py index 8682477044..509860a28f 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -10,7 +10,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0614 +# pylint: disable=wildcard-import, W0614 from .common import * import os From 5f723e8d3cdf58c783c5dd5dd945f68d7d348835 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 02:02:01 -0500 Subject: [PATCH 22/39] s/pylint: disable=W0703/pylint: disable=broad-except/ --- cms/djangoapps/contentstore/views/import_export.py | 4 ++-- cms/djangoapps/contentstore/views/item.py | 2 +- cms/djangoapps/contentstore/views/preview.py | 2 +- common/lib/capa/capa/responsetypes.py | 8 ++++---- common/lib/xmodule/xmodule/modulestore/xml_importer.py | 4 ++-- .../courseware/management/commands/clean_history.py | 2 +- lms/djangoapps/instructor/views/api.py | 4 ++-- lms/djangoapps/shoppingcart/models.py | 2 +- lms/djangoapps/verify_student/models.py | 2 +- pavelib/assets.py | 6 +++--- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cms/djangoapps/contentstore/views/import_export.py b/cms/djangoapps/contentstore/views/import_export.py index 91dc1f8d3c..a71140cbc1 100644 --- a/cms/djangoapps/contentstore/views/import_export.py +++ b/cms/djangoapps/contentstore/views/import_export.py @@ -152,7 +152,7 @@ def import_handler(request, course_key_string): }] }) # Send errors to client with stage at which error occurred. - except Exception as exception: # pylint: disable=W0703 + except Exception as exception: # pylint: disable=broad-except _save_request_status(request, key, -1) if course_dir.isdir(): shutil.rmtree(course_dir) @@ -251,7 +251,7 @@ def import_handler(request, course_key_string): _save_request_status(request, key, 4) # Send errors to client with stage at which error occurred. - except Exception as exception: # pylint: disable=W0703 + except Exception as exception: # pylint: disable=broad-except log.exception( "error importing course" ) diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index d80b334269..4428d7c087 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -221,7 +221,7 @@ def xblock_view_handler(request, usage_key_string, view_name): # catch exceptions indiscriminately, since after this point they escape the # dungeon and surface as uneditable, unsaveable, and undeletable # component-goblins. - except Exception as exc: # pylint: disable=w0703 + except Exception as exc: # pylint: disable=broad-except log.debug("unable to render studio_view for %r", xblock, exc_info=True) fragment = Fragment(render_to_string('html_error.html', {'message': str(exc)})) diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index 3e292827b1..772fc4c264 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -227,7 +227,7 @@ def get_preview_fragment(request, descriptor, context): try: fragment = module.render(preview_view, context) - except Exception as exc: # pylint: disable=W0703 + except Exception as exc: # pylint: disable=broad-except log.warning("Unable to render %s for %r", preview_view, module, exc_info=True) fragment = Fragment(render_to_string('html_error.html', {'message': str(exc)})) return fragment diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 6bcf7f1d54..3ba560342b 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -2229,7 +2229,7 @@ class ExternalResponse(LoncapaResponse): cmap = CorrectMap() try: submission = [student_answers[k] for k in idset] - except Exception as err: # pylint: disable=W0703 + except Exception as err: # pylint: disable=broad-except log.error( 'Error %s: cannot get student answer for %s; student_answers=%s', err, @@ -2244,7 +2244,7 @@ class ExternalResponse(LoncapaResponse): try: rxml = self.do_external_request('get_score', extra_payload) - except Exception as err: # pylint: disable=W0703 + except Exception as err: # pylint: disable=broad-except log.error('Error %s', err) if self.capa_system.DEBUG: cmap.set_dict(dict(zip(sorted( @@ -2276,7 +2276,7 @@ class ExternalResponse(LoncapaResponse): try: rxml = self.do_external_request('get_answers', {}) exans = json.loads(rxml.find('expected').text) - except Exception as err: # pylint: disable=W0703 + except Exception as err: # pylint: disable=broad-except log.error('Error %s', err) if self.capa_system.DEBUG: msg = '%s' % str( @@ -2486,7 +2486,7 @@ class FormulaResponse(LoncapaResponse): name = hxml.get('name') correct_answer = contextualize_text( hxml.get('answer'), self.context) - # pylint: disable=W0703 + # pylint: disable=broad-except try: correctness = self.check_formula( correct_answer, diff --git a/common/lib/xmodule/xmodule/modulestore/xml_importer.py b/common/lib/xmodule/xmodule/modulestore/xml_importer.py index 92a0bb28bd..4f89249415 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_importer.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_importer.py @@ -605,7 +605,7 @@ def _import_course_draft( drafts.append(draft) - except Exception: # pylint: disable=W0703 + except Exception: # pylint: disable=broad-except logging.exception('Error while parsing course xml.') # sort drafts by `index_in_children_list` attribute @@ -614,7 +614,7 @@ def _import_course_draft( for draft in get_draft_subtree_roots(drafts): try: _import_module(draft.module) - except Exception: # pylint: disable=W0703 + except Exception: # pylint: disable=broad-except logging.exception('while importing draft descriptor %s', draft.module) diff --git a/lms/djangoapps/courseware/management/commands/clean_history.py b/lms/djangoapps/courseware/management/commands/clean_history.py index 2a3a28592f..6478c07568 100644 --- a/lms/djangoapps/courseware/management/commands/clean_history.py +++ b/lms/djangoapps/courseware/management/commands/clean_history.py @@ -81,7 +81,7 @@ class StudentModuleHistoryCleaner(object): for smid in self.module_ids_to_check(batch_size): try: self.clean_one_student_module(smid) - except Exception: # pylint: disable=W0703 + except Exception: # pylint: disable=broad-except trace = traceback.format_exc() self.say("Couldn't clean student_module_id {}:\n{}".format(smid, trace)) if not self.dry_run: diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index ffcb49a889..e1c6659a1b 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -261,7 +261,7 @@ def register_and_enroll_students(request, course_id): # pylint: disable=too-man try: upload_file = request.FILES.get('students_list') students = [row for row in csv.reader(upload_file.read().splitlines())] - except Exception: # pylint: disable=W0703 + except Exception: # pylint: disable=broad-except general_errors.append({ 'username': '', 'email': '', 'response': _('Could not read uploaded file.') }) @@ -488,7 +488,7 @@ def students_update_enrollment(request, course_id): 'invalidIdentifier': True, }) - except Exception as exc: # pylint: disable=W0703 + except Exception as exc: # pylint: disable=broad-except # catch and log any exceptions # so that one error doesn't cause a 500. log.exception("Error while #{}ing student") diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index 3a769aa706..ac2d40eda5 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -421,7 +421,7 @@ class Order(models.Model): } }) - except Exception: # pylint: disable=W0703 + except Exception: # pylint: disable=broad-except # Capturing all exceptions thrown while tracking analytics events. We do not want # an operation to fail because of an analytics event, so we will capture these # errors in the logs. diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index 81b2085e52..6362057849 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -552,7 +552,7 @@ class SoftwareSecurePhotoVerification(PhotoVerification): attempt = attempts[0] if attempt.status != "approved": return False - except Exception: # pylint: disable=W0703 + except Exception: # pylint: disable=broad-except return False return True diff --git a/pavelib/assets.py b/pavelib/assets.py index 5e8e6045fb..a27aa2d164 100644 --- a/pavelib/assets.py +++ b/pavelib/assets.py @@ -60,7 +60,7 @@ class CoffeeScriptWatcher(PatternMatchingEventHandler): print('\tCHANGED:', event.src_path) try: compile_coffeescript(event.src_path) - except Exception: # pylint: disable=W0703 + except Exception: # pylint: disable=broad-except traceback.print_exc() @@ -89,7 +89,7 @@ class SassWatcher(PatternMatchingEventHandler): print('\tCHANGED:', event.src_path) try: compile_sass() - except Exception: # pylint: disable=W0703 + except Exception: # pylint: disable=broad-except traceback.print_exc() @@ -110,7 +110,7 @@ class XModuleSassWatcher(SassWatcher): print('\tCHANGED:', event.src_path) try: process_xmodule_assets() - except Exception: # pylint: disable=W0703 + except Exception: # pylint: disable=broad-except traceback.print_exc() From d406261e4ba4d182a25009c3f53ba9dc8a4dce27 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 15:04:21 -0500 Subject: [PATCH 23/39] s/pylint: disable=W0614/pylint: disable=unused-wildcard-import/ --- cms/envs/acceptance.py | 2 +- cms/envs/aws.py | 2 +- cms/envs/aws_migrate.py | 2 +- cms/envs/bok_choy.py | 2 +- cms/envs/common.py | 2 +- cms/envs/debug_upload.py | 2 +- cms/envs/dev.py | 2 +- cms/envs/dev_dbperf.py | 2 +- cms/envs/dev_ike.py | 2 +- cms/envs/dev_shared_preview.py | 2 +- cms/envs/dev_with_worker.py | 2 +- cms/envs/microsite_test.py | 2 +- cms/envs/test.py | 2 +- common/djangoapps/terrain/steps.py | 2 +- lms/envs/acceptance.py | 2 +- lms/envs/aws.py | 2 +- lms/envs/aws_migrate.py | 2 +- lms/envs/bok_choy.py | 2 +- lms/envs/cms/aws.py | 2 +- lms/envs/cms/dev.py | 2 +- lms/envs/cms/microsite_test.py | 2 +- lms/envs/common.py | 3 +-- lms/envs/content.py | 2 +- lms/envs/dev.py | 2 +- lms/envs/dev_ike.py | 2 +- lms/envs/dev_int.py | 2 +- lms/envs/dev_with_worker.py | 2 +- lms/envs/devgroups/courses.py | 2 +- lms/envs/devgroups/h_cs50.py | 2 +- lms/envs/devgroups/m_6002.py | 2 +- lms/envs/devgroups/portal.py | 2 +- lms/envs/discussionsettings.py | 2 +- lms/envs/edx4edx_aws.py | 2 +- lms/envs/load_test.py | 2 +- lms/envs/sauce.py | 2 +- lms/envs/static.py | 2 +- lms/envs/test.py | 2 +- 37 files changed, 37 insertions(+), 38 deletions(-) diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index d8fb8a606b..62a42cb3f6 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -5,7 +5,7 @@ so that we can run the lettuce acceptance tests. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .test import * from lms.envs.sauce import * diff --git a/cms/envs/aws.py b/cms/envs/aws.py index b43a00254a..c73f8d0472 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -4,7 +4,7 @@ This is the default template for our main set of AWS servers. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import import json diff --git a/cms/envs/aws_migrate.py b/cms/envs/aws_migrate.py index 7986d929fa..e14834ec2d 100644 --- a/cms/envs/aws_migrate.py +++ b/cms/envs/aws_migrate.py @@ -6,7 +6,7 @@ LMS with enough privileges to modify the database schema. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import # Import everything from .aws so that our settings are based on those. from .aws import * diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index 6eab6cd22d..f623571533 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -15,7 +15,7 @@ from path import path os.environ['SERVICE_VARIANT'] = 'bok_choy' os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() # pylint: disable=no-value-for-parameter -from .aws import * # pylint: disable=wildcard-import, W0614 +from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import ######################### Testing overrides #################################### diff --git a/cms/envs/common.py b/cms/envs/common.py index 1fc2423825..5b23f751c2 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -22,7 +22,7 @@ Longer TODO: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0611, W0614 +# pylint: disable=wildcard-import, W0611, unused-wildcard-import import imp import os diff --git a/cms/envs/debug_upload.py b/cms/envs/debug_upload.py index f4ef6aab8a..e9282c6888 100644 --- a/cms/envs/debug_upload.py +++ b/cms/envs/debug_upload.py @@ -2,7 +2,7 @@ A new cms ENV configuration to use a slow upload file handler to help test progress bars in uploads """ -# pylint: disable=W0614 +# pylint: disable=unused-wildcard-import from .dev import * # pylint: disable=wildcard-import FILE_UPLOAD_HANDLERS = ( diff --git a/cms/envs/dev.py b/cms/envs/dev.py index 5bfbc0048d..a82da4cfcd 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -3,7 +3,7 @@ This config file runs the simplest dev environment""" # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .common import * from logsettings import get_logger_config diff --git a/cms/envs/dev_dbperf.py b/cms/envs/dev_dbperf.py index 9942280ba1..610a974e3f 100644 --- a/cms/envs/dev_dbperf.py +++ b/cms/envs/dev_dbperf.py @@ -4,7 +4,7 @@ This configuration is to turn on the Django Toolbar stats for DB access stats, f # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .dev import * diff --git a/cms/envs/dev_ike.py b/cms/envs/dev_ike.py index 13d474a59b..c593bdcdeb 100644 --- a/cms/envs/dev_ike.py +++ b/cms/envs/dev_ike.py @@ -1,6 +1,6 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import # dev environment for ichuang/mit diff --git a/cms/envs/dev_shared_preview.py b/cms/envs/dev_shared_preview.py index cf5e021ac8..98c8fa7b15 100644 --- a/cms/envs/dev_shared_preview.py +++ b/cms/envs/dev_shared_preview.py @@ -5,7 +5,7 @@ the same process between preview and published # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .dev import * diff --git a/cms/envs/dev_with_worker.py b/cms/envs/dev_with_worker.py index cac84cb099..40f6ed4e1f 100644 --- a/cms/envs/dev_with_worker.py +++ b/cms/envs/dev_with_worker.py @@ -10,7 +10,7 @@ django_admin.py celery worker # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from dev import * diff --git a/cms/envs/microsite_test.py b/cms/envs/microsite_test.py index 724ca277f3..f84d587613 100644 --- a/cms/envs/microsite_test.py +++ b/cms/envs/microsite_test.py @@ -3,7 +3,7 @@ This is a localdev test for the Microsite processing pipeline """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .dev import * diff --git a/cms/envs/test.py b/cms/envs/test.py index e8e4e7d80e..8ee1bcb625 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -10,7 +10,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .common import * import os diff --git a/common/djangoapps/terrain/steps.py b/common/djangoapps/terrain/steps.py index ced2aa6780..5ea05ddec2 100644 --- a/common/djangoapps/terrain/steps.py +++ b/common/djangoapps/terrain/steps.py @@ -6,7 +6,7 @@ # pylint: disable=wildcard-import # Disable the "Unused import %s from wildcard import" warning -# pylint: disable=W0614 +# pylint: disable=unused-wildcard-import # Disable the "unused argument" warning because lettuce uses "step" # pylint: disable=unused-argument diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index 6a3e6ddf7a..60509a12bf 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -5,7 +5,7 @@ so that we can run the lettuce acceptance tests. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .test import * from .sauce import * diff --git a/lms/envs/aws.py b/lms/envs/aws.py index eb5e4b4dca..bacd50a31e 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -9,7 +9,7 @@ Common traits: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import import json diff --git a/lms/envs/aws_migrate.py b/lms/envs/aws_migrate.py index 7986d929fa..e14834ec2d 100644 --- a/lms/envs/aws_migrate.py +++ b/lms/envs/aws_migrate.py @@ -6,7 +6,7 @@ LMS with enough privileges to modify the database schema. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import # Import everything from .aws so that our settings are based on those. from .aws import * diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index 3974a9619d..fbb2d6ef70 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -18,7 +18,7 @@ TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" os.environ['SERVICE_VARIANT'] = 'bok_choy' os.environ['CONFIG_ROOT'] = CONFIG_ROOT -from .aws import * # pylint: disable=wildcard-import, W0614 +from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import ######################### Testing overrides #################################### diff --git a/lms/envs/cms/aws.py b/lms/envs/cms/aws.py index d16408afcf..fa93670f00 100644 --- a/lms/envs/cms/aws.py +++ b/lms/envs/cms/aws.py @@ -4,7 +4,7 @@ Settings for the LMS that runs alongside the CMS on AWS # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from ..aws import * diff --git a/lms/envs/cms/dev.py b/lms/envs/cms/dev.py index 622ff1e709..0669147d0f 100644 --- a/lms/envs/cms/dev.py +++ b/lms/envs/cms/dev.py @@ -4,7 +4,7 @@ Settings for the LMS that runs alongside the CMS on AWS # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from ..dev import * diff --git a/lms/envs/cms/microsite_test.py b/lms/envs/cms/microsite_test.py index 15ed0a535a..586e357e85 100644 --- a/lms/envs/cms/microsite_test.py +++ b/lms/envs/cms/microsite_test.py @@ -3,7 +3,7 @@ This is a localdev test for the Microsite processing pipeline """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .dev import * from ..dev import ENV_ROOT, FEATURES diff --git a/lms/envs/common.py b/lms/envs/common.py index dc02a16ad1..e4053e7bb7 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -22,8 +22,7 @@ Longer TODO: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0611, W0614, invalid-name - +# pylint: disable=wildcard-import, W0611, unused-wildcard-import, invalid-name import sys import os diff --git a/lms/envs/content.py b/lms/envs/content.py index 1606e7e9a8..90c9f8a0fb 100644 --- a/lms/envs/content.py +++ b/lms/envs/content.py @@ -5,7 +5,7 @@ between dev machines and AWS machines. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .aws import * diff --git a/lms/envs/dev.py b/lms/envs/dev.py index 77cdb69113..85ce3e3906 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -10,7 +10,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .common import * from logsettings import get_logger_config diff --git a/lms/envs/dev_ike.py b/lms/envs/dev_ike.py index f39911f144..9aea2f0e10 100644 --- a/lms/envs/dev_ike.py +++ b/lms/envs/dev_ike.py @@ -10,7 +10,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .common import * from .dev import * diff --git a/lms/envs/dev_int.py b/lms/envs/dev_int.py index 15367119e2..f6e5ef028e 100644 --- a/lms/envs/dev_int.py +++ b/lms/envs/dev_int.py @@ -12,7 +12,7 @@ use *.dev domains instead for local testing. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .dev import * diff --git a/lms/envs/dev_with_worker.py b/lms/envs/dev_with_worker.py index cac84cb099..40f6ed4e1f 100644 --- a/lms/envs/dev_with_worker.py +++ b/lms/envs/dev_with_worker.py @@ -10,7 +10,7 @@ django_admin.py celery worker # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from dev import * diff --git a/lms/envs/devgroups/courses.py b/lms/envs/devgroups/courses.py index d170f372e7..edf7484bbf 100644 --- a/lms/envs/devgroups/courses.py +++ b/lms/envs/devgroups/courses.py @@ -1,7 +1,7 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from ..dev import * diff --git a/lms/envs/devgroups/h_cs50.py b/lms/envs/devgroups/h_cs50.py index a82f3f90e2..2c64946a3f 100644 --- a/lms/envs/devgroups/h_cs50.py +++ b/lms/envs/devgroups/h_cs50.py @@ -1,7 +1,7 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .courses import * diff --git a/lms/envs/devgroups/m_6002.py b/lms/envs/devgroups/m_6002.py index eb96cdda8b..5df2a33440 100644 --- a/lms/envs/devgroups/m_6002.py +++ b/lms/envs/devgroups/m_6002.py @@ -1,7 +1,7 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .courses import * diff --git a/lms/envs/devgroups/portal.py b/lms/envs/devgroups/portal.py index f8c1d015b6..e972d9f36c 100644 --- a/lms/envs/devgroups/portal.py +++ b/lms/envs/devgroups/portal.py @@ -5,7 +5,7 @@ get shared sessions) # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from courses import * diff --git a/lms/envs/discussionsettings.py b/lms/envs/discussionsettings.py index 1ac4c23af8..f32fb43e44 100644 --- a/lms/envs/discussionsettings.py +++ b/lms/envs/discussionsettings.py @@ -1,5 +1,5 @@ # We intentionally define variables that aren't used -# pylint: disable=W0614 +# pylint: disable=unused-wildcard-import DISCUSSION_ALLOWED_UPLOAD_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff') diff --git a/lms/envs/edx4edx_aws.py b/lms/envs/edx4edx_aws.py index 151a6556d3..4ff2133e7b 100644 --- a/lms/envs/edx4edx_aws.py +++ b/lms/envs/edx4edx_aws.py @@ -1,6 +1,6 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import # Settings for edx4edx production instance from .aws import * diff --git a/lms/envs/load_test.py b/lms/envs/load_test.py index b81ee45587..c21e226527 100644 --- a/lms/envs/load_test.py +++ b/lms/envs/load_test.py @@ -4,7 +4,7 @@ Settings for load testing. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .aws import * diff --git a/lms/envs/sauce.py b/lms/envs/sauce.py index 80ca002c74..c8c7577ed5 100644 --- a/lms/envs/sauce.py +++ b/lms/envs/sauce.py @@ -5,7 +5,7 @@ so that we can run the lettuce acceptance tests on SauceLabs. # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import os diff --git a/lms/envs/static.py b/lms/envs/static.py index 8c13f7daea..101d790420 100644 --- a/lms/envs/static.py +++ b/lms/envs/static.py @@ -10,7 +10,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .common import * from logsettings import get_logger_config diff --git a/lms/envs/test.py b/lms/envs/test.py index 509860a28f..de74f29c0f 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -10,7 +10,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0614 +# pylint: disable=wildcard-import, unused-wildcard-import from .common import * import os From ff18b7d01a71466894c875c5fbce1319be5c1d24 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 15:08:24 -0500 Subject: [PATCH 24/39] s/pylint: disable=W0611/pylint: disable=unused-import/ --- cms/envs/common.py | 2 +- common/djangoapps/student/helpers.py | 2 +- lms/envs/common.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index 5b23f751c2..4055c5c944 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -22,7 +22,7 @@ Longer TODO: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0611, unused-wildcard-import +# pylint: disable=wildcard-import, unused-import, unused-wildcard-import import imp import os diff --git a/common/djangoapps/student/helpers.py b/common/djangoapps/student/helpers.py index 23bba3d0dd..32ed5f9363 100644 --- a/common/djangoapps/student/helpers.py +++ b/common/djangoapps/student/helpers.py @@ -5,7 +5,7 @@ from django.conf import settings from django.core.urlresolvers import reverse from opaque_keys.edx.keys import CourseKey from course_modes.models import CourseMode -from third_party_auth import ( # pylint: disable=W0611 +from third_party_auth import ( # pylint: disable=unused-import pipeline, provider, is_enabled as third_party_auth_enabled ) diff --git a/lms/envs/common.py b/lms/envs/common.py index e4053e7bb7..fda0901581 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -22,7 +22,7 @@ Longer TODO: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, W0611, unused-wildcard-import, invalid-name +# pylint: disable=wildcard-import, unused-import, unused-wildcard-import, invalid-name import sys import os From 7229ef92ee248b1ea8ccf03b082ec94206c874e0 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 17:16:42 -0500 Subject: [PATCH 25/39] s/pylint: disable=W0212/pylint: disable=protected-access/ --- .../contentstore/tests/test_contentstore.py | 1 - common/lib/capa/capa/tests/test_inputtypes.py | 46 +++++++++---------- .../xmodule/modulestore/tests/test_mongo.py | 2 +- .../tests/test_split_modulestore.py | 4 +- .../xmodule/xmodule/tests/test_capa_module.py | 4 +- .../lib/xmodule/xmodule/tests/test_import.py | 4 +- .../xmodule/tests/test_textannotation.py | 4 +- .../lib/xmodule/xmodule/tests/test_video.py | 2 +- .../xmodule/tests/test_videoannotation.py | 8 ++-- docs/en_us/developers/source/conf.py | 2 +- docs/en_us/platform_api/source/conf.py | 2 +- lms/djangoapps/course_wiki/middleware.py | 2 +- .../courseware/tests/test_access.py | 2 +- .../courseware/tests/test_video_xml.py | 2 +- lms/djangoapps/shoppingcart/admin.py | 2 +- 15 files changed, 43 insertions(+), 44 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index 9bde0a6672..b753bbe130 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -# pylint: disable=W0212 import copy import mock diff --git a/common/lib/capa/capa/tests/test_inputtypes.py b/common/lib/capa/capa/tests/test_inputtypes.py index b53ce496f4..632ae5dcb9 100644 --- a/common/lib/capa/capa/tests/test_inputtypes.py +++ b/common/lib/capa/capa/tests/test_inputtypes.py @@ -54,7 +54,7 @@ class OptionInputTest(unittest.TestCase): 'status': 'answered'} option_input = lookup_tag('optioninput')(test_capa_system(), element, state) - context = option_input._get_render_context() # pylint: disable=W0212 + context = option_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -114,7 +114,7 @@ class ChoiceGroupTest(unittest.TestCase): the_input = lookup_tag(tag)(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -168,7 +168,7 @@ class JavascriptInputTest(unittest.TestCase): state = {'value': '3', } the_input = lookup_tag('javascriptinput')(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -200,7 +200,7 @@ class TextLineTest(unittest.TestCase): state = {'value': 'BumbleBee', } the_input = lookup_tag('textline')(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -232,7 +232,7 @@ class TextLineTest(unittest.TestCase): state = {'value': 'BumbleBee', } the_input = lookup_tag('textline')(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -276,7 +276,7 @@ class TextLineTest(unittest.TestCase): state = {'value': 'BumbleBee', } the_input = lookup_tag('textline')(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -318,7 +318,7 @@ class FileSubmissionTest(unittest.TestCase): input_class = lookup_tag('filesubmission') the_input = input_class(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -367,7 +367,7 @@ class CodeInputTest(unittest.TestCase): input_class = lookup_tag('codeinput') the_input = input_class(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -421,7 +421,7 @@ class MatlabTest(unittest.TestCase): self.the_input = self.input_class(test_capa_system(), elt, state) def test_rendering(self): - context = self.the_input._get_render_context() # pylint: disable=W0212 + context = self.the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -452,7 +452,7 @@ class MatlabTest(unittest.TestCase): elt = etree.fromstring(self.xml) the_input = self.input_class(test_capa_system(), elt, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -484,7 +484,7 @@ class MatlabTest(unittest.TestCase): elt = etree.fromstring(self.xml) the_input = self.input_class(test_capa_system(), elt, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', 'id': 'prob_1_2', @@ -515,7 +515,7 @@ class MatlabTest(unittest.TestCase): elt = etree.fromstring(self.xml) the_input = self.input_class(test_capa_system(), elt, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', 'id': 'prob_1_2', @@ -721,7 +721,7 @@ class MatlabTest(unittest.TestCase): elt = etree.fromstring(self.xml) the_input = self.input_class(test_capa_system(), elt, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access self.maxDiff = None expected = fromstring(u'\n
if Conditionally execute statements.\nThe general form of the if statement is\n\n if expression\n statements\n ELSEIF expression\n statements\n ELSE\n statements\n END\n\nThe statements are executed if the real part of the expression \nhas all non-zero elements. The ELSE and ELSEIF parts are optional.\nZero or more ELSEIF parts can be used as well as nested if\'s.\nThe expression is usually of the form expr rop expr where \nrop is ==, <, >, <=, >=, or ~=.\n\n\nExample\n if I == J\n A(I,J) = 2;\n elseif abs(I-J) == 1\n A(I,J) = -1;\n else\n A(I,J) = 0;\n end\n\nSee also relop, else, elseif, end, for, while, switch.\n\nReference page in Help browser\n doc if\n\n
    \n') received = fromstring(context['queue_msg']) @@ -792,7 +792,7 @@ class MatlabTest(unittest.TestCase): not_allowed_tag = 'script' self.the_input.msg = "<{0}>Test message".format(not_allowed_tag) expected = "<script>Test message</script>" - self.assertEqual(self.the_input._get_render_context()['msg'], expected) + self.assertEqual(self.the_input._get_render_context()['msg'], expected) # pylint: disable=protected-access def html_tree_equal(received, expected): @@ -840,7 +840,7 @@ class SchematicTest(unittest.TestCase): the_input = lookup_tag('schematic')(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -884,7 +884,7 @@ class ImageInputTest(unittest.TestCase): the_input = lookup_tag('imageinput')(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -939,7 +939,7 @@ class CrystallographyTest(unittest.TestCase): the_input = lookup_tag('crystallography')(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -981,7 +981,7 @@ class VseprTest(unittest.TestCase): the_input = lookup_tag('vsepr_input')(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -1013,7 +1013,7 @@ class ChemicalEquationTest(unittest.TestCase): def test_rendering(self): ''' Verify that the render context matches the expected render context''' - context = self.the_input._get_render_context() # pylint: disable=W0212 + context = self.the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -1101,7 +1101,7 @@ class FormulaEquationTest(unittest.TestCase): """ Verify that the render context matches the expected render context """ - context = self.the_input._get_render_context() # pylint: disable=W0212 + context = self.the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -1231,7 +1231,7 @@ class DragAndDropTest(unittest.TestCase): the_input = lookup_tag('drag_and_drop_input')(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', 'id': 'prob_1_2', @@ -1283,7 +1283,7 @@ class AnnotationInputTest(unittest.TestCase): the_input = lookup_tag(tag)(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access expected = { 'STATIC_URL': '/dummy-static/', @@ -1373,7 +1373,7 @@ class TestChoiceText(unittest.TestCase): } expected.update(state) the_input = lookup_tag(tag)(test_capa_system(), element, state) - context = the_input._get_render_context() # pylint: disable=W0212 + context = the_input._get_render_context() # pylint: disable=protected-access self.assertEqual(context, expected) def test_radiotextgroup(self): diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py index 663be7a467..b08031252a 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py @@ -2,7 +2,7 @@ Unit tests for the Mongo modulestore """ # pylint: disable=no-member -# pylint: disable=W0212 +# pylint: disable=protected-access # pylint: disable=no-name-in-module from nose.tools import assert_equals, assert_raises, \ assert_not_equals, assert_false, assert_true, assert_greater, assert_is_instance, assert_is_none 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 8ea9d26c81..c2135b5291 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py @@ -865,7 +865,7 @@ class SplitModuleItemTests(SplitModuleTest): with self.assertRaises(ItemNotFoundError): modulestore().get_item(locator) - # pylint: disable=W0212 + # pylint: disable=protected-access def test_matching(self): ''' test the block and value matches help functions @@ -1304,7 +1304,7 @@ class TestItemCrud(SplitModuleTest): fields={'display_name': 'problem 2', 'data': another_payload}, definition_locator=original.definition_locator, ) - # pylint: disable=W0212 + # pylint: disable=protected-access modulestore()._clear_cache() # now begin the test diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index 4d117c69e9..65213e58f0 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -601,7 +601,7 @@ class CapaModuleTest(unittest.TestCase): def test_check_problem_with_files(self): # Check a problem with uploaded files, using the check_problem API. - # pylint: disable=W0212 + # pylint: disable=protected-access # The files we'll be uploading. fnames = ["prog1.py", "prog2.py", "prog3.py"] @@ -650,7 +650,7 @@ class CapaModuleTest(unittest.TestCase): def test_check_problem_with_files_as_xblock(self): # Check a problem with uploaded files, using the XBlock API. - # pylint: disable=W0212 + # pylint: disable=protected-access # The files we'll be uploading. fnames = ["prog1.py", "prog2.py", "prog3.py"] diff --git a/common/lib/xmodule/xmodule/tests/test_import.py b/common/lib/xmodule/xmodule/tests/test_import.py index 2d7518b1c6..079b73f81c 100644 --- a/common/lib/xmodule/xmodule/tests/test_import.py +++ b/common/lib/xmodule/xmodule/tests/test_import.py @@ -206,7 +206,7 @@ class ImportTestCase(BaseCourseTestCase): descriptor = system.process_xml(start_xml) compute_inherited_metadata(descriptor) - # pylint: disable=W0212 + # pylint: disable=protected-access print(descriptor, descriptor._field_data) self.assertEqual(descriptor.due, ImportTestCase.date.from_json(v)) @@ -296,7 +296,7 @@ class ImportTestCase(BaseCourseTestCase): '''.format(due=course_due, org=ORG, course=COURSE, url_name=url_name) descriptor = system.process_xml(start_xml) child = descriptor.get_children()[0] - # pylint: disable=W0212 + # pylint: disable=protected-access child._field_data.set(child, 'due', child_due) compute_inherited_metadata(descriptor) diff --git a/common/lib/xmodule/xmodule/tests/test_textannotation.py b/common/lib/xmodule/xmodule/tests/test_textannotation.py index 23d41a659b..7d0e664cdc 100644 --- a/common/lib/xmodule/xmodule/tests/test_textannotation.py +++ b/common/lib/xmodule/xmodule/tests/test_textannotation.py @@ -60,12 +60,12 @@ class TextAnnotationModuleTestCase(unittest.TestCase): xmltree = etree.fromstring(self.sample_xml) expected_xml = u"

    Test Instructions.

    " - actual_xml = self.mod._extract_instructions(xmltree) # pylint: disable=W0212 + actual_xml = self.mod._extract_instructions(xmltree) # pylint: disable=protected-access self.assertIsNotNone(actual_xml) self.assertEqual(expected_xml.strip(), actual_xml.strip()) xmltree = etree.fromstring('foo') - actual = self.mod._extract_instructions(xmltree) # pylint: disable=W0212 + actual = self.mod._extract_instructions(xmltree) # pylint: disable=protected-access self.assertIsNone(actual) def test_student_view(self): diff --git a/common/lib/xmodule/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py index f27cb6c2dc..f92c3f9cb1 100644 --- a/common/lib/xmodule/xmodule/tests/test_video.py +++ b/common/lib/xmodule/xmodule/tests/test_video.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# pylint: disable=W0212 +# pylint: disable=protected-access """Test for Video Xmodule functional logic. These test data read from xml, not from mongo. diff --git a/common/lib/xmodule/xmodule/tests/test_videoannotation.py b/common/lib/xmodule/xmodule/tests/test_videoannotation.py index 18630344b6..075cee71df 100644 --- a/common/lib/xmodule/xmodule/tests/test_videoannotation.py +++ b/common/lib/xmodule/xmodule/tests/test_videoannotation.py @@ -56,12 +56,12 @@ class VideoAnnotationModuleTestCase(unittest.TestCase): xmltree = etree.fromstring(self.sample_xml) expected_xml = u"

    Video Test Instructions.

    " - actual_xml = self.mod._extract_instructions(xmltree) # pylint: disable=W0212 + actual_xml = self.mod._extract_instructions(xmltree) # pylint: disable=protected-access self.assertIsNotNone(actual_xml) self.assertEqual(expected_xml.strip(), actual_xml.strip()) xmltree = etree.fromstring('foo') - actual = self.mod._extract_instructions(xmltree) # pylint: disable=W0212 + actual = self.mod._extract_instructions(xmltree) # pylint: disable=protected-access self.assertIsNone(actual) def test_get_extension(self): @@ -71,8 +71,8 @@ class VideoAnnotationModuleTestCase(unittest.TestCase): """ expectedyoutube = 'video/youtube' expectednotyoutube = 'video/mp4' - result1 = self.mod._get_extension(self.sample_sourceurl) # pylint: disable=W0212 - result2 = self.mod._get_extension(self.sample_youtubeurl) # pylint: disable=W0212 + result1 = self.mod._get_extension(self.sample_sourceurl) # pylint: disable=protected-access + result2 = self.mod._get_extension(self.sample_youtubeurl) # pylint: disable=protected-access self.assertEqual(expectedyoutube, result2) self.assertEqual(expectednotyoutube, result1) diff --git a/docs/en_us/developers/source/conf.py b/docs/en_us/developers/source/conf.py index ff60da07dd..bccbb11c5e 100644 --- a/docs/en_us/developers/source/conf.py +++ b/docs/en_us/developers/source/conf.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # pylint: disable=invalid-name # pylint: disable=W0622 -# pylint: disable=W0212 +# pylint: disable=protected-access # pylint: disable=unused-argument import os diff --git a/docs/en_us/platform_api/source/conf.py b/docs/en_us/platform_api/source/conf.py index 0836542763..628aed8b5d 100644 --- a/docs/en_us/platform_api/source/conf.py +++ b/docs/en_us/platform_api/source/conf.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # pylint: disable=invalid-name # pylint: disable=W0622 -# pylint: disable=W0212 +# pylint: disable=protected-access # pylint: disable=unused-argument import os diff --git a/lms/djangoapps/course_wiki/middleware.py b/lms/djangoapps/course_wiki/middleware.py index 355d4d9f8b..ba824f305f 100644 --- a/lms/djangoapps/course_wiki/middleware.py +++ b/lms/djangoapps/course_wiki/middleware.py @@ -98,5 +98,5 @@ class WikiAccessMiddleware(object): response = self._redirect_from_referrer(request, wiki_path) or response # END HACK: _transform_url must be set to a no-op function after it's done its work - reverse._transform_url = lambda url: url # pylint: disable=W0212 + reverse._transform_url = lambda url: url # pylint: disable=protected-access return response diff --git a/lms/djangoapps/courseware/tests/test_access.py b/lms/djangoapps/courseware/tests/test_access.py index bd2a8217a7..0963b74489 100644 --- a/lms/djangoapps/courseware/tests/test_access.py +++ b/lms/djangoapps/courseware/tests/test_access.py @@ -16,7 +16,7 @@ from xmodule.course_module import ( CATALOG_VISIBILITY_NONE) # pylint: disable=missing-docstring -# pylint: disable=W0212 +# pylint: disable=protected-access class AccessTestCase(TestCase): diff --git a/lms/djangoapps/courseware/tests/test_video_xml.py b/lms/djangoapps/courseware/tests/test_video_xml.py index 5f9c87be16..508c261c5c 100644 --- a/lms/djangoapps/courseware/tests/test_video_xml.py +++ b/lms/djangoapps/courseware/tests/test_video_xml.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# pylint: disable=W0212 +# pylint: disable=protected-access """Test for Video Xmodule functional logic. These test data read from xml, not from mongo. diff --git a/lms/djangoapps/shoppingcart/admin.py b/lms/djangoapps/shoppingcart/admin.py index d2d9195777..8f68b098c2 100644 --- a/lms/djangoapps/shoppingcart/admin.py +++ b/lms/djangoapps/shoppingcart/admin.py @@ -22,7 +22,7 @@ class SoftDeleteCouponAdmin(admin.ModelAdmin): admin site. This is used by changelist_view. """ # Default: qs = self.model._default_manager.get_active_coupons_query_set() # Queryset with all the coupons including the soft-deletes: qs = self.model._default_manager.get_query_set() - query_string = self.model._default_manager.get_active_coupons_query_set() # pylint: disable=W0212 + query_string = self.model._default_manager.get_active_coupons_query_set() # pylint: disable=protected-access return query_string def get_actions(self, request): From 0c7b60b82bfd55f8cf04377afe95d226b8c7dc66 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 17:26:17 -0500 Subject: [PATCH 26/39] Remove 'pylint: disable=W0232' because we ignore this warning in pylintrc --- common/djangoapps/course_modes/tests/factories.py | 4 ++-- common/djangoapps/reverification/tests/factories.py | 4 ++-- common/djangoapps/student/tests/factories.py | 4 ++-- common/djangoapps/user_api/tests/factories.py | 4 ++-- common/djangoapps/util/tests/test_date_utils.py | 1 - .../xmodule/xmodule/modulestore/tests/persistent_factories.py | 4 ++-- lms/djangoapps/certificates/tests/factories.py | 4 ++-- lms/djangoapps/courseware/tests/factories.py | 4 ++-- 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/common/djangoapps/course_modes/tests/factories.py b/common/djangoapps/course_modes/tests/factories.py index 5ca0153db1..bbe1ca5c2b 100644 --- a/common/djangoapps/course_modes/tests/factories.py +++ b/common/djangoapps/course_modes/tests/factories.py @@ -3,8 +3,8 @@ from factory.django import DjangoModelFactory from opaque_keys.edx.locations import SlashSeparatedCourseKey -# Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232 +# Factories are self documenting +# pylint: disable=missing-docstring class CourseModeFactory(DjangoModelFactory): FACTORY_FOR = CourseMode diff --git a/common/djangoapps/reverification/tests/factories.py b/common/djangoapps/reverification/tests/factories.py index 58684d97f0..4416875243 100644 --- a/common/djangoapps/reverification/tests/factories.py +++ b/common/djangoapps/reverification/tests/factories.py @@ -8,8 +8,8 @@ from datetime import timedelta, datetime from opaque_keys.edx.locations import SlashSeparatedCourseKey -# Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232 +# Factories are self documenting +# pylint: disable=missing-docstring class MidcourseReverificationWindowFactory(DjangoModelFactory): """ Creates a generic MidcourseReverificationWindow. """ FACTORY_FOR = MidcourseReverificationWindow diff --git a/common/djangoapps/student/tests/factories.py b/common/djangoapps/student/tests/factories.py index 1c99eead81..880beac7da 100644 --- a/common/djangoapps/student/tests/factories.py +++ b/common/djangoapps/student/tests/factories.py @@ -12,8 +12,8 @@ from uuid import uuid4 from pytz import UTC from opaque_keys.edx.locations import SlashSeparatedCourseKey -# Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232, missing-docstring +# Factories are self documenting +# pylint: disable=missing-docstring class GroupFactory(DjangoModelFactory): diff --git a/common/djangoapps/user_api/tests/factories.py b/common/djangoapps/user_api/tests/factories.py index 25be6bf188..60ee7c2ddc 100644 --- a/common/djangoapps/user_api/tests/factories.py +++ b/common/djangoapps/user_api/tests/factories.py @@ -6,8 +6,8 @@ from user_api.models import UserPreference, UserCourseTag, UserOrgTag from opaque_keys.edx.locations import SlashSeparatedCourseKey -# Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232, missing-docstring +# Factories are self documenting +# pylint: disable=missing-docstring class UserPreferenceFactory(DjangoModelFactory): FACTORY_FOR = UserPreference diff --git a/common/djangoapps/util/tests/test_date_utils.py b/common/djangoapps/util/tests/test_date_utils.py index 579c476c04..de3308658e 100644 --- a/common/djangoapps/util/tests/test_date_utils.py +++ b/common/djangoapps/util/tests/test_date_utils.py @@ -70,7 +70,6 @@ def test_get_time_display_coerce(): get_time_display(test_time_daylight, '%b %d %H:%M', coerce_tz="US/Pacific")) -# pylint: disable=W0232 class NamelessTZ(tzinfo): """Static timezone for testing""" diff --git a/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py b/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py index 9fe356a20a..2eee09740f 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py @@ -5,8 +5,8 @@ from xmodule.x_module import XModuleDescriptor import factory from factory.helpers import lazy_attribute from opaque_keys.edx.keys import UsageKey -# Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232, missing-docstring +# Factories are self documenting +# pylint: disable=missing-docstring class SplitFactory(factory.Factory): diff --git a/lms/djangoapps/certificates/tests/factories.py b/lms/djangoapps/certificates/tests/factories.py index 38527f92c4..d800032f66 100644 --- a/lms/djangoapps/certificates/tests/factories.py +++ b/lms/djangoapps/certificates/tests/factories.py @@ -5,8 +5,8 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey from certificates.models import GeneratedCertificate, CertificateStatuses -# Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232 +# Factories are self documenting +# pylint: disable=missing-docstring class GeneratedCertificateFactory(DjangoModelFactory): FACTORY_FOR = GeneratedCertificate diff --git a/lms/djangoapps/courseware/tests/factories.py b/lms/djangoapps/courseware/tests/factories.py index 7770d13db3..c47fc54f41 100644 --- a/lms/djangoapps/courseware/tests/factories.py +++ b/lms/djangoapps/courseware/tests/factories.py @@ -1,5 +1,5 @@ -# Factories don't have __init__ methods, and are self documenting -# pylint: disable=W0232, missing-docstring +# Factories are self documenting +# pylint: disable=missing-docstring import json from functools import partial import factory From 7aab4151bb93054ea4c7cbc807ac4e398d55be6c Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 17:44:20 -0500 Subject: [PATCH 27/39] s/pylint: disable=W0201/pylint: disable=attribute-defined-outside-init/ --- common/lib/capa/capa/capa_problem.py | 2 +- common/lib/capa/capa/responsetypes.py | 4 ++-- common/lib/xmodule/xmodule/modulestore/mongo/base.py | 2 +- common/test/acceptance/tests/discussion/test_cohorts.py | 4 ++-- common/test/acceptance/tests/discussion/test_discussion.py | 4 ++-- lms/djangoapps/courseware/tests/test_module_render.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index 7b3dbbe79f..699db9aaf3 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -439,7 +439,7 @@ class LoncapaProblem(object): # Note that the modifications has been done, avoiding problems if called twice. if hasattr(self, 'has_targeted'): return - self.has_targeted = True # pylint: disable=W0201 + self.has_targeted = True # pylint: disable=attribute-defined-outside-init for mult_choice_response in tree.xpath('//multiplechoiceresponse[@targeted-feedback]'): show_explanation = mult_choice_response.get('targeted-feedback') == 'alwaysShowCorrectChoiceExplanation' diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 3ba560342b..a0b74372e2 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -874,7 +874,7 @@ class MultipleChoiceResponse(LoncapaResponse): # Both to avoid double-processing, and to feed the logs. if self.has_shuffle(): return - self._has_shuffle = True # pylint: disable=W0201 + self._has_shuffle = True # pylint: disable=attribute-defined-outside-init # Move elements from tree to list for shuffling, then put them back. ordering = list(choicegroup.getchildren()) for choice in ordering: @@ -958,7 +958,7 @@ class MultipleChoiceResponse(LoncapaResponse): # Both to avoid double-processing, and to feed the logs. if self.has_answerpool(): return - self._has_answerpool = True # pylint: disable=W0201 + self._has_answerpool = True # pylint: disable=attribute-defined-outside-init choices_list = list(choicegroup.getchildren()) diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/base.py b/common/lib/xmodule/xmodule/modulestore/mongo/base.py index 9865491599..9f5a09aee3 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/base.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/base.py @@ -442,7 +442,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo # TODO (cpennington): Enable non-filesystem filestores # pylint: disable=invalid-name - # pylint: disable=W0201 + # pylint: disable=attribute-defined-outside-init def __init__(self, contentstore, doc_store_config, fs_root, render_template, default_class=None, error_tracker=null_error_tracker, diff --git a/common/test/acceptance/tests/discussion/test_cohorts.py b/common/test/acceptance/tests/discussion/test_cohorts.py index d63afd00e1..0fed9573a6 100644 --- a/common/test/acceptance/tests/discussion/test_cohorts.py +++ b/common/test/acceptance/tests/discussion/test_cohorts.py @@ -70,7 +70,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest): AutoAuthPage(self.browser, course_id=self.course_id).visit() def setup_thread_page(self, thread_id): - self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint: disable=W0201 + self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint: disable=attribute-defined-outside-init self.thread_page.visit() # pylint: disable=unused-argument @@ -129,7 +129,7 @@ class InlineDiscussionTest(UniqueCourseTest): discussion_page = InlineDiscussionPage(self.browser, self.discussion_id) discussion_page.expand_discussion() self.assertEqual(discussion_page.get_num_displayed_threads(), 1) - self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint: disable=W0201 + self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint: disable=attribute-defined-outside-init self.thread_page.expand() def refresh_thread_page(self, thread_id): diff --git a/common/test/acceptance/tests/discussion/test_discussion.py b/common/test/acceptance/tests/discussion/test_discussion.py index 8b2c887ed2..7d8f188f6a 100644 --- a/common/test/acceptance/tests/discussion/test_discussion.py +++ b/common/test/acceptance/tests/discussion/test_discussion.py @@ -127,7 +127,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest, DiscussionResponsePaginati AutoAuthPage(self.browser, course_id=self.course_id).visit() def setup_thread_page(self, thread_id): - self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint: disable=W0201 + self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint: disable=attribute-defined-outside-init self.thread_page.visit() def test_marked_answer_comments(self): @@ -318,7 +318,7 @@ class InlineDiscussionTest(UniqueCourseTest, DiscussionResponsePaginationTestMix def setup_thread_page(self, thread_id): self.discussion_page.expand_discussion() self.assertEqual(self.discussion_page.get_num_displayed_threads(), 1) - self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint: disable=W0201 + self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint: disable=attribute-defined-outside-init self.thread_page.expand() def test_initial_render(self): diff --git a/lms/djangoapps/courseware/tests/test_module_render.py b/lms/djangoapps/courseware/tests/test_module_render.py index 7de4d93108..a08902eb50 100644 --- a/lms/djangoapps/courseware/tests/test_module_render.py +++ b/lms/djangoapps/courseware/tests/test_module_render.py @@ -608,7 +608,7 @@ class ViewInStudioTest(ModuleStoreTestCase): self.module = self._get_module(course.id, descriptor, descriptor.location) - # pylint: disable=W0201 + # pylint: disable=attribute-defined-outside-init self.child_module = self._get_module(course.id, child_descriptor, child_descriptor.location) def setup_xml_course(self): From f663a7fe8d817fd433e5e508b0acba9c36e1e116 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 17:48:56 -0500 Subject: [PATCH 28/39] s/pylint: disable=W0612/pylint: disable=unused-variable/ --- common/lib/xmodule/xmodule/tests/test_progress.py | 10 +++++----- lms/djangoapps/instructor/views/api.py | 2 +- lms/djangoapps/shoppingcart/models.py | 4 ++-- lms/djangoapps/shoppingcart/tests/test_views.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/test_progress.py b/common/lib/xmodule/xmodule/tests/test_progress.py index 74835ffc97..d821f557ad 100644 --- a/common/lib/xmodule/xmodule/tests/test_progress.py +++ b/common/lib/xmodule/xmodule/tests/test_progress.py @@ -23,12 +23,12 @@ class ProgressTest(unittest.TestCase): def test_create_object(self): # These should work: - prg1 = Progress(0, 2) # pylint: disable=W0612 - prg2 = Progress(1, 2) # pylint: disable=W0612 - prg3 = Progress(2, 2) # pylint: disable=W0612 + prg1 = Progress(0, 2) # pylint: disable=unused-variable + prg2 = Progress(1, 2) # pylint: disable=unused-variable + prg3 = Progress(2, 2) # pylint: disable=unused-variable - prg4 = Progress(2.5, 5.0) # pylint: disable=W0612 - prg5 = Progress(3.7, 12.3333) # pylint: disable=W0612 + prg4 = Progress(2.5, 5.0) # pylint: disable=unused-variable + prg5 = Progress(3.7, 12.3333) # pylint: disable=unused-variable # These shouldn't self.assertRaises(ValueError, Progress, 0, 0) diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index e1c6659a1b..9e6013a350 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -811,7 +811,7 @@ def get_sale_order_records(request, course_id): # pylint: disable=unused-argume db_columns = [x[0] for x in query_features] csv_columns = [x[1] for x in query_features] sale_data = instructor_analytics.basic.sale_order_record_features(course_id, db_columns) - header, datarows = instructor_analytics.csvs.format_dictlist(sale_data, db_columns) # pylint: disable=W0612 + header, datarows = instructor_analytics.csvs.format_dictlist(sale_data, db_columns) # pylint: disable=unused-variable return instructor_analytics.csvs.create_csv_response("e-commerce_sale_order_records.csv", csv_columns, datarows) diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index ac2d40eda5..8a67b37a14 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -1026,7 +1026,7 @@ class CourseRegCodeItem(OrderItem): super(CourseRegCodeItem, cls).add_to_order(order, course_id, cost, currency=currency) - item, created = cls.objects.get_or_create(order=order, user=order.user, course_id=course_id) # pylint: disable=W0612 + item, created = cls.objects.get_or_create(order=order, user=order.user, course_id=course_id) # pylint: disable=unused-variable item.status = order.status item.mode = course_mode.slug item.unit_cost = cost @@ -1057,7 +1057,7 @@ class CourseRegCodeItem(OrderItem): # file, but there's also a shared dependency on a random string generator which # is in another PR (for another feature) from instructor.views.api import save_registration_code - for i in range(total_registration_codes): # pylint: disable=W0612 + for i in range(total_registration_codes): # pylint: disable=unused-variable save_registration_code(self.user, self.course_id, invoice=None, order=self.order) log.info("Enrolled {0} in paid course {1}, paid ${2}" diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index b16749e2e5..ea453e77fb 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -1095,7 +1095,7 @@ class RegistrationCodeRedemptionCourseEnrollment(ModuleStoreTestCase): cache.clear() url = reverse('register_code_redemption', args=['asdasd']) self.login_user() - for i in xrange(30): # pylint: disable=W0612 + for i in xrange(30): # pylint: disable=unused-variable response = self.client.post(url, **{'HTTP_HOST': 'localhost'}) self.assertEquals(response.status_code, 404) @@ -1119,7 +1119,7 @@ class RegistrationCodeRedemptionCourseEnrollment(ModuleStoreTestCase): cache.clear() url = reverse('register_code_redemption', args=['asdasd']) self.login_user() - for i in xrange(30): # pylint: disable=W0612 + for i in xrange(30): # pylint: disable=unused-variable response = self.client.get(url, **{'HTTP_HOST': 'localhost'}) self.assertEquals(response.status_code, 404) From 13946fb844a02a129bac4e452081879b750e4522 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 17:50:24 -0500 Subject: [PATCH 29/39] s/pylint: disable=W0511/pylint: disable=fixme/ --- cms/djangoapps/contentstore/views/__init__.py | 2 +- common/djangoapps/student/models.py | 2 +- common/djangoapps/student/tests/tests.py | 2 +- common/djangoapps/user_api/api/course_tag.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cms/djangoapps/contentstore/views/__init__.py b/cms/djangoapps/contentstore/views/__init__.py index d55180eaf5..48ff107f11 100644 --- a/cms/djangoapps/contentstore/views/__init__.py +++ b/cms/djangoapps/contentstore/views/__init__.py @@ -1,4 +1,4 @@ -# pylint: disable=wildcard-import, W0511 +# pylint: disable=wildcard-import, fixme "All view functions for contentstore, broken out into submodules" diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 08d5c0ffb7..2a373afb68 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -1164,7 +1164,7 @@ class CourseEnrollment(models.Model): if GeneratedCertificate.certificate_for_student(self.user, self.course_id) is not None: return False - #TODO - When Course administrators to define a refund period for paid courses then refundable will be supported. # pylint: disable=W0511 + #TODO - When Course administrators to define a refund period for paid courses then refundable will be supported. # pylint: disable=fixme course_mode = CourseMode.mode_for_course(self.course_id, 'verified') if course_mode is None: diff --git a/common/djangoapps/student/tests/tests.py b/common/djangoapps/student/tests/tests.py index 3bf2fde715..4c4177d18b 100644 --- a/common/djangoapps/student/tests/tests.py +++ b/common/djangoapps/student/tests/tests.py @@ -322,7 +322,7 @@ class DashboardTest(ModuleStoreTestCase): ) enrollment = CourseEnrollment.enroll(self.user, self.course.id, mode='honor') - # TODO: Until we can allow course administrators to define a refund period for paid for courses show_refund_option should be False. # pylint: disable=W0511 + # TODO: Until we can allow course administrators to define a refund period for paid for courses show_refund_option should be False. # pylint: disable=fixme self.assertFalse(enrollment.refundable()) resp = self.client.post(reverse('student.views.dashboard', args=[])) diff --git a/common/djangoapps/user_api/api/course_tag.py b/common/djangoapps/user_api/api/course_tag.py index 43907fbe72..89e7f49b85 100644 --- a/common/djangoapps/user_api/api/course_tag.py +++ b/common/djangoapps/user_api/api/course_tag.py @@ -53,7 +53,7 @@ def set_course_tag(user, course_id, key, value): key: arbitrary (<=255 char string) value: arbitrary string """ - # pylint: disable=W0511 + # pylint: disable=fixme # TODO: There is a risk of IntegrityErrors being thrown here given # simultaneous calls from many processes. Handle by retrying after # a short delay? From 520935209d3c4363e55cf372aa11a90b6dee2933 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 18:05:59 -0500 Subject: [PATCH 30/39] s/pylint: disable=W0402/pylint: disable=deprecated-module/ --- cms/djangoapps/contentstore/views/course.py | 2 +- common/djangoapps/external_auth/views.py | 2 +- common/djangoapps/util/password_policy_validators.py | 2 +- common/lib/symmath/symmath/formula.py | 2 +- lms/djangoapps/django_comment_client/tests.py | 2 +- lms/djangoapps/instructor/views/api.py | 2 +- lms/djangoapps/lms_migration/management/commands/create_user.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 7f62d1ac42..318e3f9f3f 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -3,7 +3,7 @@ Views related to operations on course objects """ import json import random -import string # pylint: disable=W0402 +import string # pylint: disable=deprecated-module import logging from django.utils.translation import ugettext as _ import django.utils diff --git a/common/djangoapps/external_auth/views.py b/common/djangoapps/external_auth/views.py index b0f64303a1..8e28b47ef0 100644 --- a/common/djangoapps/external_auth/views.py +++ b/common/djangoapps/external_auth/views.py @@ -3,7 +3,7 @@ import json import logging import random import re -import string # pylint: disable=W0402 +import string # pylint: disable=deprecated-module import fnmatch import unicodedata import urllib diff --git a/common/djangoapps/util/password_policy_validators.py b/common/djangoapps/util/password_policy_validators.py index c3c94d33e8..6541c4b90d 100644 --- a/common/djangoapps/util/password_policy_validators.py +++ b/common/djangoapps/util/password_policy_validators.py @@ -7,7 +7,7 @@ This file was inspired by the django-passwords project at https://github.com/dst authored by dstufft (https://github.com/dstufft) """ from __future__ import division -import string # pylint: disable=W0402 +import string # pylint: disable=deprecated-module from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ diff --git a/common/lib/symmath/symmath/formula.py b/common/lib/symmath/symmath/formula.py index 4da7cdc71c..0c6aa05a24 100644 --- a/common/lib/symmath/symmath/formula.py +++ b/common/lib/symmath/symmath/formula.py @@ -12,7 +12,7 @@ Provides sympy representation. # import os -import string # pylint: disable=W0402 +import string # pylint: disable=deprecated-module import re import logging import operator diff --git a/lms/djangoapps/django_comment_client/tests.py b/lms/djangoapps/django_comment_client/tests.py index dd6b4b5832..e5d95c7f17 100644 --- a/lms/djangoapps/django_comment_client/tests.py +++ b/lms/djangoapps/django_comment_client/tests.py @@ -1,7 +1,7 @@ """ Tests of various permissions levels for the comment client """ -import string # pylint: disable=W0402 +import string # pylint: disable=deprecated-module import random from django.contrib.auth.models import User diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 9e6013a350..dfb862cf2b 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -23,7 +23,7 @@ from django.core.validators import validate_email from django.utils.translation import ugettext as _ from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, HttpResponseNotFound from django.utils.html import strip_tags -import string # pylint: disable=W0402 +import string # pylint: disable=deprecated-module import random import urllib from util.json_request import JsonResponse diff --git a/lms/djangoapps/lms_migration/management/commands/create_user.py b/lms/djangoapps/lms_migration/management/commands/create_user.py index 327a597166..20e5e045bf 100644 --- a/lms/djangoapps/lms_migration/management/commands/create_user.py +++ b/lms/djangoapps/lms_migration/management/commands/create_user.py @@ -6,7 +6,7 @@ import os import sys -import string # pylint: disable=W0402 +import string # pylint: disable=deprecated-module import datetime from getpass import getpass import json From 3c364193bbfb4559f956118f6d388769eddac4ee Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 18:07:06 -0500 Subject: [PATCH 31/39] s/pylint: disable=W0104/pylint: disable=pointless-statement/ --- cms/startup.py | 2 +- common/lib/calc/calc/calc.py | 2 +- lms/startup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cms/startup.py b/cms/startup.py index 815b03ecea..b754847204 100644 --- a/cms/startup.py +++ b/cms/startup.py @@ -5,7 +5,7 @@ Module with code executed during Studio startup from django.conf import settings # Force settings to run so that the python path is modified -settings.INSTALLED_APPS # pylint: disable=W0104 +settings.INSTALLED_APPS # pylint: disable=pointless-statement from django_startup import autostartup from monkey_patch import django_utils_translation diff --git a/common/lib/calc/calc/calc.py b/common/lib/calc/calc/calc.py index 0d283d3966..7d50c8e38e 100644 --- a/common/lib/calc/calc/calc.py +++ b/common/lib/calc/calc/calc.py @@ -356,7 +356,7 @@ class ParseAugmenter(object): sum_term = Group(sum_term)("sum") # Finish the recursion. - expr << sum_term # pylint: disable=W0104 + expr << sum_term # pylint: disable=pointless-statement self.tree = (expr + stringEnd).parseString(self.math_expr)[0] def reduce_tree(self, handle_actions, terminal_converter=None): diff --git a/lms/startup.py b/lms/startup.py index f0e3777e53..1e02c56144 100644 --- a/lms/startup.py +++ b/lms/startup.py @@ -5,7 +5,7 @@ Module for code that should run during LMS startup from django.conf import settings # Force settings to run so that the python path is modified -settings.INSTALLED_APPS # pylint: disable=W0104 +settings.INSTALLED_APPS # pylint: disable=pointless-statement from django_startup import autostartup import edxmako From 1dd7cf69464f9ab8282900936f37d05a3e5bcd1a Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 18:08:36 -0500 Subject: [PATCH 32/39] s/pylint: disable=W0603/pylint: disable=global-statement/ --- common/djangoapps/terrain/stubs/youtube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/terrain/stubs/youtube.py b/common/djangoapps/terrain/stubs/youtube.py index 2bf8d7dcf6..688fe0ed1e 100644 --- a/common/djangoapps/terrain/stubs/youtube.py +++ b/common/djangoapps/terrain/stubs/youtube.py @@ -52,7 +52,7 @@ class StubYouTubeHandler(StubHttpRequestHandler): """ # Initialize only once if IFRAME_API_RESPONSE is none. - global IFRAME_API_RESPONSE # pylint: disable=W0603 + global IFRAME_API_RESPONSE # pylint: disable=global-statement if IFRAME_API_RESPONSE is None: IFRAME_API_RESPONSE = requests.get('https://www.youtube.com/iframe_api').content.strip("\n") From 2cbdb509467168d237c81649a7d1f76b4bafb47d Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 18:10:16 -0500 Subject: [PATCH 33/39] s/pylint: disable=W0142/pylint: disable=star-args/ --- .../xmodule/xmodule/modulestore/tests/test_split_modulestore.py | 2 +- .../lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 c2135b5291..f41ec6acad 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py @@ -1846,7 +1846,7 @@ def modulestore(): options.update(SplitModuleTest.MODULESTORE['OPTIONS']) options['render_template'] = render_to_template_mock - # pylint: disable=W0142 + # pylint: disable=star-args SplitModuleTest.modulestore = class_( None, # contentstore SplitModuleTest.MODULESTORE['DOC_STORE_CONFIG'], diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py b/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py index 4260d849a4..a6b227b03b 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py @@ -84,7 +84,7 @@ def modulestore(): options.update(ModuleStoreNoSettings.MODULESTORE['OPTIONS']) options['render_template'] = render_to_template_mock - # pylint: disable=W0142 + # pylint: disable=star-args ModuleStoreNoSettings.modulestore = class_( None, # contentstore ModuleStoreNoSettings.MODULESTORE['DOC_STORE_CONFIG'], From aa04bef9c8e7393da479f922794178bdf98e4102 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 18:11:03 -0500 Subject: [PATCH 34/39] s/pylint: disable=W0223/pylint: disable=abstract-method/ --- common/lib/xmodule/xmodule/video_module/video_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/video_module/video_module.py b/common/lib/xmodule/xmodule/video_module/video_module.py index c05cf4ec16..a9b093590d 100644 --- a/common/lib/xmodule/xmodule/video_module/video_module.py +++ b/common/lib/xmodule/xmodule/video_module/video_module.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# pylint: disable=W0223 +# pylint: disable=abstract-method """Video is ungraded Xmodule for support video content. It's new improved video module, which support additional feature: From 9c7c4c8d267b245cf12de044cc8943238e4d6cd2 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 18:12:01 -0500 Subject: [PATCH 35/39] s/pylint: disable=W0622/pylint: disable=redefined-builtin/ --- docs/en_us/developers/source/conf.py | 2 +- docs/en_us/platform_api/source/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en_us/developers/source/conf.py b/docs/en_us/developers/source/conf.py index bccbb11c5e..8751e46de1 100644 --- a/docs/en_us/developers/source/conf.py +++ b/docs/en_us/developers/source/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # pylint: disable=invalid-name -# pylint: disable=W0622 +# pylint: disable=redefined-builtin # pylint: disable=protected-access # pylint: disable=unused-argument diff --git a/docs/en_us/platform_api/source/conf.py b/docs/en_us/platform_api/source/conf.py index 628aed8b5d..f2951c453f 100644 --- a/docs/en_us/platform_api/source/conf.py +++ b/docs/en_us/platform_api/source/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # pylint: disable=invalid-name -# pylint: disable=W0622 +# pylint: disable=redefined-builtin # pylint: disable=protected-access # pylint: disable=unused-argument From 640353d94acd02f6b21c4487016e97437fe92ef2 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 18:12:52 -0500 Subject: [PATCH 36/39] s/pylint: disable=W0231/pylint: disable=super-init-not-called/ --- lms/djangoapps/instructor/tests/test_enrollment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/instructor/tests/test_enrollment.py b/lms/djangoapps/instructor/tests/test_enrollment.py index 505d1de45f..5484912564 100644 --- a/lms/djangoapps/instructor/tests/test_enrollment.py +++ b/lms/djangoapps/instructor/tests/test_enrollment.py @@ -371,7 +371,7 @@ class SettableEnrollmentState(EmailEnrollmentState): a call to create_user will make objects which correspond to the state represented in the SettableEnrollmentState. """ - def __init__(self, user=False, enrollment=False, allowed=False, auto_enroll=False): # pylint: disable=W0231 + def __init__(self, user=False, enrollment=False, allowed=False, auto_enroll=False): # pylint: disable=super-init-not-called self.user = user self.enrollment = enrollment self.allowed = allowed From 547660fd873bc6644ac5a244d962e72bde4fa860 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 18:15:13 -0500 Subject: [PATCH 37/39] Resolve "pointless-string-statement" pylint violation --- .../instructor/views/instructor_dashboard.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index 95a9b116ea..73aa8e839e 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -114,17 +114,15 @@ def instructor_dashboard_2(request, course_id): return render_to_response('instructor/instructor_dashboard_2/instructor_dashboard_2.html', context) -""" -Section functions starting with _section return a dictionary of section data. +## Section functions starting with _section return a dictionary of section data. -The dictionary must include at least { - 'section_key': 'circus_expo' - 'section_display_name': 'Circus Expo' -} +## The dictionary must include at least { +## 'section_key': 'circus_expo' +## 'section_display_name': 'Circus Expo' +## } -section_key will be used as a css attribute, javascript tie-in, and template import filename. -section_display_name will be used to generate link titles in the nav bar. -""" # pylint: disable=W0105 +## section_key will be used as a css attribute, javascript tie-in, and template import filename. +## section_display_name will be used to generate link titles in the nav bar. def _section_e_commerce(course, access): From 252d6704d0d8d79136cf0975e0070a09469edd45 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 18:16:25 -0500 Subject: [PATCH 38/39] s/pylint: disable=W0221/pylint: disable=arguments-differ/ --- lms/djangoapps/shoppingcart/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index 8a67b37a14..fd87f70081 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -988,7 +988,7 @@ class CourseRegCodeItem(OrderItem): @classmethod @transaction.commit_on_success - def add_to_order(cls, order, course_id, qty, mode_slug=CourseMode.DEFAULT_MODE_SLUG, cost=None, currency=None): # pylint: disable=W0221 + def add_to_order(cls, order, course_id, qty, mode_slug=CourseMode.DEFAULT_MODE_SLUG, cost=None, currency=None): # pylint: disable=arguments-differ """ A standardized way to create these objects, with sensible defaults filled in. Will update the cost if called on an order that already carries the course. From 6569d7542bdbf05380b4bb8afac6ecc663cc7d85 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 21:05:50 -0500 Subject: [PATCH 39/39] Clean up pep8 violation --- pavelib/paver_tests/test_prereqs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pavelib/paver_tests/test_prereqs.py b/pavelib/paver_tests/test_prereqs.py index cf08ddde35..e4586d1843 100644 --- a/pavelib/paver_tests/test_prereqs.py +++ b/pavelib/paver_tests/test_prereqs.py @@ -37,4 +37,3 @@ class TestPaverPrereqInstall(unittest.TestCase): def test_no_prereq_install_1(self): self.check_val('1', True) -