From e17504d7b867e58a71e0a6e05df1011bd728062d Mon Sep 17 00:00:00 2001 From: stv Date: Mon, 16 Feb 2015 09:03:09 -0800 Subject: [PATCH] Fix Pylint: E0012(bad-option-value) --- common/lib/xmodule/xmodule/tabs.py | 8 +------- lms/djangoapps/bulk_email/forms.py | 4 ++-- lms/djangoapps/dashboard/models.py | 2 -- lms/djangoapps/dashboard/support.py | 2 +- lms/djangoapps/notes/api.py | 4 ++-- lms/djangoapps/survey/admin.py | 2 +- 6 files changed, 7 insertions(+), 15 deletions(-) diff --git a/common/lib/xmodule/xmodule/tabs.py b/common/lib/xmodule/xmodule/tabs.py index fb0926950a..9020f058f0 100644 --- a/common/lib/xmodule/xmodule/tabs.py +++ b/common/lib/xmodule/xmodule/tabs.py @@ -1,12 +1,6 @@ """ Implement CourseTab """ -# pylint: disable=incomplete-protocol -# Note: pylint complains that we do not implement __delitem__ and __len__, although we implement __setitem__ -# and __getitem__. However, the former two do not apply to the CourseTab class so we do not implement them. -# The reason we implement the latter two is to enable callers to continue to use the CourseTab object with -# dict-type accessors. - from abc import ABCMeta, abstractmethod from xblock.fields import List @@ -15,7 +9,7 @@ from xblock.fields import List _ = lambda text: text -class CourseTab(object): # pylint: disable=incomplete-protocol +class CourseTab(object): """ The Course Tab class is a data abstraction for all tabs (i.e., course navigation links) within a course. It is an abstract class - to be inherited by various tab types. diff --git a/lms/djangoapps/bulk_email/forms.py b/lms/djangoapps/bulk_email/forms.py index 49fb840560..cacd689d87 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=incomplete-protocol +class CourseEmailTemplateForm(forms.ModelForm): """Form providing validation of CourseEmail templates.""" name = forms.CharField(required=False) @@ -73,7 +73,7 @@ class CourseEmailTemplateForm(forms.ModelForm): # pylint: disable=incomplete-pr return name -class CourseAuthorizationAdminForm(forms.ModelForm): # pylint: disable=incomplete-protocol +class CourseAuthorizationAdminForm(forms.ModelForm): """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 2fa3e17678..a92a418871 100644 --- a/lms/djangoapps/dashboard/models.py +++ b/lms/djangoapps/dashboard/models.py @@ -6,8 +6,6 @@ from xmodule.modulestore.mongoengine_fields import CourseKeyField class CourseImportLog(mongoengine.Document): """Mongoengine model for git log""" - # pylint: disable=incomplete-protocol - course_id = CourseKeyField(max_length=128) # NOTE: this location is not a Location object but a pathname location = mongoengine.StringField(max_length=168) diff --git a/lms/djangoapps/dashboard/support.py b/lms/djangoapps/dashboard/support.py index 02fcf6d4cd..eda7a31218 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=incomplete-protocol +class RefundForm(forms.Form): """ Form for manual refunds """ diff --git a/lms/djangoapps/notes/api.py b/lms/djangoapps/notes/api.py index 920229edaf..44abb99e20 100644 --- a/lms/djangoapps/notes/api.py +++ b/lms/djangoapps/notes/api.py @@ -163,7 +163,7 @@ def read(request, _course_key, note_id): return ApiResponse(http_response=HttpResponse(), data=note.as_dict()) -def update(request, course_key, note_id): # pylint: disable=unused-argument (course_key) +def update(request, course_key, note_id): # pylint: disable=unused-argument ''' Updates an annotation object and returns a 303 with the read location. ''' @@ -247,7 +247,7 @@ def search(request, course_key): return ApiResponse(http_response=HttpResponse(), data=result) -def root(request, course_key): # pylint: disable=unused-argument (course_key, request) +def root(request, course_key): # pylint: disable=unused-argument ''' Returns version information about the API. ''' diff --git a/lms/djangoapps/survey/admin.py b/lms/djangoapps/survey/admin.py index 26b0cfd71b..07431e6d56 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=incomplete-protocol +class SurveyFormAdminForm(forms.ModelForm): """Form providing validation of SurveyForm content.""" class Meta: # pylint: disable=missing-docstring