Commit 49fb9663 by stv

Fix Pylint: C0202(bad-classmethod-argument)

parent 66f28fd8
......@@ -165,7 +165,7 @@ class SubtaskStatus(object):
self.state = state if state is not None else QUEUING
@classmethod
def from_dict(self, d):
def from_dict(cls, d):
"""Construct a SubtaskStatus object from a dict representation."""
options = dict(d)
task_id = options['task_id']
......@@ -173,9 +173,9 @@ class SubtaskStatus(object):
return SubtaskStatus.create(task_id, **options)
@classmethod
def create(self, task_id, **options):
def create(cls, task_id, **options):
"""Construct a SubtaskStatus object."""
return self(task_id, **options)
return cls(task_id, **options)
def to_dict(self):
"""
......
......@@ -1930,7 +1930,7 @@ class Donation(OrderItem):
).format(platform_name=settings.PLATFORM_NAME)
@classmethod
def _line_item_description(self, course_id=None):
def _line_item_description(cls, course_id=None):
"""Create a line-item description for the donation.
Includes the course display name if provided.
......
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