Commit 71f09d6d by Carlos Andrés Rocha

Fix PEP 8 errors

Also:
- update .gitignore with results of coverage
- update Makefile to limit pep8 checking to edx folder

Change-Id: Ic4047bf45bd89087249fee76a447eeecc5de8642
parent b82bf1c4
...@@ -34,3 +34,9 @@ nosetests.xml ...@@ -34,3 +34,9 @@ nosetests.xml
.mr.developer.cfg .mr.developer.cfg
.project .project
.pydevproject .pydevproject
# QA
coverage.xml
diff_*.html
*.report
report
...@@ -27,5 +27,5 @@ coverage: test ...@@ -27,5 +27,5 @@ coverage: test
diff-quality --violations=pylint --html-report diff_quality_pylint.html diff-quality --violations=pylint --html-report diff_quality_pylint.html
# Compute style violations # Compute style violations
pep8 > pep8.report || echo "Not pep8 clean" pep8 edx > pep8.report || echo "Not pep8 clean"
pylint -f parseable edx > pylint.report || echo "Not pylint clean" pylint -f parseable edx > pylint.report || echo "Not pylint clean"
...@@ -115,8 +115,8 @@ class CourseEnrollmentEventsPerDayMixin(object): ...@@ -115,8 +115,8 @@ class CourseEnrollmentEventsPerDayMixin(object):
enrollment_status = new_enrollment_status enrollment_status = new_enrollment_status
else: else:
logger.warning("WARNING: duplicate enrollment event {status} " logger.warning("WARNING: duplicate enrollment event {status} "
"for user_id {user_id} in course {course_id} on {date}".format( "for user_id {user_id} in course {course_id} on {date}".format(
status=new_enrollment_status, user_id=user_id, course_id=course_id, date=this_date)) status=new_enrollment_status, user_id=user_id, course_id=course_id, date=this_date))
prev_date = this_date prev_date = this_date
...@@ -144,7 +144,7 @@ class CourseEnrollmentChangesPerDayMixin(object): ...@@ -144,7 +144,7 @@ class CourseEnrollmentChangesPerDayMixin(object):
Args: Args:
key: (course_id, datestamp) tuple key: (course_id, datestamp) tuple
values: iterator of enrollment_changes values: iterator of enrollment_changes
Input `enrollment_changes` are the enrollment changes on a day due to a specific user. Input `enrollment_changes` are the enrollment changes on a day due to a specific user.
Each user with a change has a separate input, either -1 (unenroll) or 1 (enroll). Each user with a change has a separate input, either -1 (unenroll) or 1 (enroll).
......
...@@ -190,7 +190,7 @@ class EnrollmentsByWeek(luigi.Task): ...@@ -190,7 +190,7 @@ class EnrollmentsByWeek(luigi.Task):
# List the dates of the last day of each week requested. # List the dates of the last day of each week requested.
start, weeks = self.date, self.weeks start, weeks = self.date, self.weeks
days = [start - timedelta(i*7) for i in reversed(xrange(0, weeks))] days = [start - timedelta(i * 7) for i in reversed(xrange(0, weeks))]
# Sample the cumulative data on the requested days. # Sample the cumulative data on the requested days.
# Result is NaN if there is no data available for that date. # Result is NaN if there is no data available for that date.
......
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