Commit 6bd371c7 by Clinton Blackburn

Merge pull request #5 from edx/pep257

PEP 257 Fixes
parents 6d21985d 39950e16
...@@ -19,4 +19,4 @@ quality: ...@@ -19,4 +19,4 @@ quality:
pylint --rcfile=.pylintrc $(PACKAGE) pylint --rcfile=.pylintrc $(PACKAGE)
# Ignore module level docstrings and all test files # Ignore module level docstrings and all test files
pep257 --ignore=D100 --match='(?!test).*py' $(PACKAGE) pep257 --ignore=D100,D203 --match='(?!test).*py' $(PACKAGE)
""" """ Course activity types. """
Course activity types.
"""
ANY = 'any' ANY = 'any'
ATTEMPTED_PROBLEM = 'attempted_problem' ATTEMPTED_PROBLEM = 'attempted_problem'
......
...@@ -13,12 +13,13 @@ log = logging.getLogger(__name__) ...@@ -13,12 +13,13 @@ log = logging.getLogger(__name__)
class Client(object): class Client(object):
""" """
Analytics API client Analytics API client.
The instance has attributes `status` and `courses` that provide access to instances of The instance has attributes `status` and `courses` that provide access to instances of
:class: `~analyticsclient.status` and :class: `~analyticsclient.course`. This is the preferred (and only supported) :class: `~analyticsclient.status` and :class: `~analyticsclient.course`. This is the preferred (and only supported)
way to get access to those classes and their methods. way to get access to those classes and their methods.
""" """
def __init__(self, base_url, auth_token=None): def __init__(self, base_url, auth_token=None):
""" """
Initialize the client. Initialize the client.
......
...@@ -2,9 +2,7 @@ import analyticsclient.activity_type as at ...@@ -2,9 +2,7 @@ import analyticsclient.activity_type as at
class Course(object): class Course(object):
""" """ Course-related analytics. """
Course-related analytics.
"""
def __init__(self, client, course_id): def __init__(self, client, course_id):
""" """
......
""" """ Course demographics. """
Course demographics
"""
BIRTH_YEAR = 'birth_year' BIRTH_YEAR = 'birth_year'
EDUCATION = 'education' EDUCATION = 'education'
......
...@@ -2,10 +2,7 @@ from analyticsclient.exceptions import ClientError ...@@ -2,10 +2,7 @@ from analyticsclient.exceptions import ClientError
class Status(object): class Status(object):
""" API server status. """
"""
API server status.
"""
def __init__(self, client): def __init__(self, client):
""" """
......
...@@ -4,11 +4,10 @@ from analyticsclient.client import Client ...@@ -4,11 +4,10 @@ from analyticsclient.client import Client
class ClientTestCase(TestCase): class ClientTestCase(TestCase):
""" """ Base class for client-related tests. """
Base class for client-related tests.
"""
def setUp(self): def setUp(self):
""" Configure Client. """
self.api_url = 'http://localhost:9999/api/v0' self.api_url = 'http://localhost:9999/api/v0'
self.client = Client(self.api_url) self.client = Client(self.api_url)
......
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