Commit 181eed24 by stv

Silence unrelated warnings

parent f03b943b
...@@ -4,6 +4,9 @@ from django.test import TestCase ...@@ -4,6 +4,9 @@ from django.test import TestCase
class Content(object): class Content(object):
"""
Mock cached content
"""
def __init__(self, location, content): def __init__(self, location, content):
self.location = location self.location = location
self.content = content self.content = content
......
...@@ -51,6 +51,9 @@ injected humour and the like). ...@@ -51,6 +51,9 @@ injected humour and the like).
class Content(object): class Content(object):
"""
A class with location and content_type members
"""
def __init__(self, location, content_type): def __init__(self, location, content_type):
self.location = location self.location = location
self.content_type = content_type self.content_type = content_type
......
...@@ -114,7 +114,7 @@ class GeneratedCertificate(models.Model): ...@@ -114,7 +114,7 @@ class GeneratedCertificate(models.Model):
auto_now=True, default=datetime.now) auto_now=True, default=datetime.now)
error_reason = models.CharField(max_length=512, blank=True, default='') error_reason = models.CharField(max_length=512, blank=True, default='')
class Meta(object): class Meta(object): # pylint: disable=missing-docstring
unique_together = (('user', 'course_id'),) unique_together = (('user', 'course_id'),)
@classmethod @classmethod
......
...@@ -42,7 +42,7 @@ class CodeMirror(BaseEditor): ...@@ -42,7 +42,7 @@ class CodeMirror(BaseEditor):
def get_widget(self, instance=None): def get_widget(self, instance=None):
return CodeMirrorWidget() return CodeMirrorWidget()
class AdminMedia(object): class AdminMedia(object): # pylint: disable=missing-docstring
css = { css = {
'all': ("wiki/markitup/skins/simple/style.css", 'all': ("wiki/markitup/skins/simple/style.css",
"wiki/markitup/sets/admin/style.css",) "wiki/markitup/sets/admin/style.css",)
...@@ -52,7 +52,7 @@ class CodeMirror(BaseEditor): ...@@ -52,7 +52,7 @@ class CodeMirror(BaseEditor):
"wiki/markitup/sets/admin/set.js", "wiki/markitup/sets/admin/set.js",
) )
class Media(object): class Media(object): # pylint: disable=missing-docstring
css = { css = {
'all': ("js/vendor/CodeMirror/codemirror.css",) 'all': ("js/vendor/CodeMirror/codemirror.css",)
} }
......
...@@ -46,7 +46,7 @@ class StudentModule(models.Model): ...@@ -46,7 +46,7 @@ class StudentModule(models.Model):
course_id = CourseKeyField(max_length=255, db_index=True) course_id = CourseKeyField(max_length=255, db_index=True)
class Meta(object): class Meta(object): # pylint: disable=missing-docstring
unique_together = (('student', 'module_state_key', 'course_id'),) unique_together = (('student', 'module_state_key', 'course_id'),)
## Internal state of the object ## Internal state of the object
...@@ -102,7 +102,7 @@ class StudentModuleHistory(models.Model): ...@@ -102,7 +102,7 @@ class StudentModuleHistory(models.Model):
HISTORY_SAVING_TYPES = {'problem'} HISTORY_SAVING_TYPES = {'problem'}
class Meta(object): class Meta(object): # pylint: disable=missing-docstring
get_latest_by = "created" get_latest_by = "created"
student_module = models.ForeignKey(StudentModule, db_index=True) student_module = models.ForeignKey(StudentModule, db_index=True)
...@@ -135,7 +135,7 @@ class XBlockFieldBase(models.Model): ...@@ -135,7 +135,7 @@ class XBlockFieldBase(models.Model):
""" """
Base class for all XBlock field storage. Base class for all XBlock field storage.
""" """
class Meta(object): class Meta(object): # pylint: disable=missing-docstring
abstract = True abstract = True
# The name of the field # The name of the field
...@@ -163,7 +163,7 @@ class XModuleUserStateSummaryField(XBlockFieldBase): ...@@ -163,7 +163,7 @@ class XModuleUserStateSummaryField(XBlockFieldBase):
Stores data set in the Scope.user_state_summary scope by an xmodule field Stores data set in the Scope.user_state_summary scope by an xmodule field
""" """
class Meta(object): class Meta(object): # pylint: disable=missing-docstring
unique_together = (('usage_id', 'field_name'),) unique_together = (('usage_id', 'field_name'),)
# The definition id for the module # The definition id for the module
...@@ -189,7 +189,7 @@ class XModuleStudentInfoField(XBlockFieldBase): ...@@ -189,7 +189,7 @@ class XModuleStudentInfoField(XBlockFieldBase):
Stores data set in the Scope.preferences scope by an xmodule field Stores data set in the Scope.preferences scope by an xmodule field
""" """
class Meta(object): class Meta(object): # pylint: disable=missing-docstring
unique_together = (('student', 'field_name'),) unique_together = (('student', 'field_name'),)
student = models.ForeignKey(User, db_index=True) student = models.ForeignKey(User, db_index=True)
...@@ -207,7 +207,7 @@ class OfflineComputedGrade(models.Model): ...@@ -207,7 +207,7 @@ class OfflineComputedGrade(models.Model):
gradeset = models.TextField(null=True, blank=True) # grades, stored as JSON gradeset = models.TextField(null=True, blank=True) # grades, stored as JSON
class Meta: class Meta(object): # pylint: disable=missing-docstring
unique_together = (('user', 'course_id'), ) unique_together = (('user', 'course_id'), )
def __unicode__(self): def __unicode__(self):
...@@ -219,7 +219,7 @@ class OfflineComputedGradeLog(models.Model): ...@@ -219,7 +219,7 @@ class OfflineComputedGradeLog(models.Model):
Log of when offline grades are computed. Log of when offline grades are computed.
Use this to be able to show instructor when the last computed grades were done. Use this to be able to show instructor when the last computed grades were done.
""" """
class Meta(object): class Meta(object): # pylint: disable=missing-docstring
ordering = ["-created"] ordering = ["-created"]
get_latest_by = "created" get_latest_by = "created"
......
...@@ -83,7 +83,7 @@ class PuzzleComplete(models.Model): ...@@ -83,7 +83,7 @@ class PuzzleComplete(models.Model):
e.g. PuzzleID 1234, set 1, subset 3. (Sets and subsets correspond to levels e.g. PuzzleID 1234, set 1, subset 3. (Sets and subsets correspond to levels
in the intro puzzles) in the intro puzzles)
""" """
class Meta(object): class Meta(object): # pylint: disable=missing-docstring
# there should only be one puzzle complete entry for any particular # there should only be one puzzle complete entry for any particular
# puzzle for any user # puzzle for any user
unique_together = ('user', 'puzzle_id', 'puzzle_set', 'puzzle_subset') unique_together = ('user', 'puzzle_id', 'puzzle_set', 'puzzle_subset')
......
...@@ -31,7 +31,7 @@ def create_groups(): ...@@ -31,7 +31,7 @@ def create_groups():
cxfn = path(data_dir) / course_dir / 'course.xml' cxfn = path(data_dir) / course_dir / 'course.xml'
try: try:
coursexml = etree.parse(cxfn) coursexml = etree.parse(cxfn)
except Exception: except Exception: # pylint: disable=broad-except
print "Oops, cannot read %s, skipping" % cxfn print "Oops, cannot read %s, skipping" % cxfn
continue continue
cxmlroot = coursexml.getroot() cxmlroot = coursexml.getroot()
......
...@@ -63,7 +63,7 @@ class NotifierUserSerializer(serializers.ModelSerializer): ...@@ -63,7 +63,7 @@ class NotifierUserSerializer(serializers.ModelSerializer):
pass pass
return ret return ret
class Meta(object): class Meta(object): # pylint: disable=missing-docstring
model = User model = User
fields = ("id", "email", "name", "preferences", "course_info") fields = ("id", "email", "name", "preferences", "course_info")
read_only_fields = ("id", "email") read_only_fields = ("id", "email")
...@@ -177,7 +177,7 @@ class PhotoVerification(StatusModel): ...@@ -177,7 +177,7 @@ class PhotoVerification(StatusModel):
# capturing it so that we can later query for the common problems. # capturing it so that we can later query for the common problems.
error_code = models.CharField(blank=True, max_length=50) error_code = models.CharField(blank=True, max_length=50)
class Meta(object): class Meta(object): # pylint: disable=missing-docstring
abstract = True abstract = True
ordering = ['-created_at'] ordering = ['-created_at']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment