Commit 4856d4e0 by Dennis Jen

Upgraded pylint to 1.5.0.

parent 5b5c792d
......@@ -74,7 +74,7 @@ def consolidate_answers(problem):
for answer in answers:
if consolidated_answer:
if type(consolidated_answer) == ProblemResponseAnswerDistribution:
if isinstance(consolidated_answer, ProblemResponseAnswerDistribution):
consolidated_answer.count += answer.count
else:
consolidated_answer.first_response_count += answer.first_response_count
......
......@@ -369,8 +369,7 @@ class CourseEnrollmentByGenderViewTests(CourseEnrollmentViewTestCaseMixin, Defau
for gender in _genders:
expected[gender] = 0
expected = [expected]
self.assertViewReturnsExpectedData(expected)
self.assertViewReturnsExpectedData([expected])
class CourseEnrollmentViewTests(CourseEnrollmentViewTestCaseMixin, TestCaseWithAuthentication):
......@@ -465,8 +464,7 @@ class CourseEnrollmentModeViewTests(CourseEnrollmentViewTestCaseMixin, DefaultFi
expected[u'count'] = 1
expected[u'cumulative_count'] = 100
expected = [expected]
self.assertViewReturnsExpectedData(expected)
self.assertViewReturnsExpectedData([expected])
class CourseEnrollmentByLocationViewTests(CourseEnrollmentViewTestCaseMixin, TestCaseWithAuthentication):
......
......@@ -5,9 +5,10 @@
# pylint: disable=no-member,no-value-for-parameter
from django_dynamic_fixture import G
import json
from django_dynamic_fixture import G
from analytics_data_api.v0 import models
from analytics_data_api.v0.serializers import ProblemFirstLastResponseAnswerDistributionSerializer, \
GradeDistributionSerializer, SequentialOpenDistributionSerializer
......@@ -124,10 +125,10 @@ class AnswerDistributionTests(TestCaseWithAuthentication):
expected_data[1]['consolidated_variant'] = False
response.data = set([json.dumps(answer) for answer in response.data])
expected_data = set([json.dumps(answer) for answer in expected_data])
response.data = [json.dumps(answer) for answer in response.data]
expected_data = [json.dumps(answer) for answer in expected_data]
self.assertEquals(response.data, expected_data)
self.assertEquals(set(response.data), set(expected_data))
def test_get_404(self):
response = self.authenticated_get('/api/v0/problems/%s%s' % ("DOES-NOT-EXIST", self.path))
......
from django.conf import settings
from django.db import connections
from django.http import HttpResponse
from rest_framework.renderers import JSONRenderer
from rest_framework import permissions
from rest_framework.renderers import JSONRenderer
from rest_framework.response import Response
from django.conf import settings
from django.db import connections
from rest_framework.views import APIView
......
......@@ -7,9 +7,6 @@
# pygtk.require().
#init-hook=''
# Profiled execution.
profile=no
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS, migrations, settings
......@@ -91,10 +88,6 @@ reports=no
# (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Add a comment according to your evaluation note. This is used by the global
# evaluation report (RP0004).
comment=no
[TYPECHECK]
......@@ -106,10 +99,6 @@ ignore-mixin-members=yes
# (useful for classes with attributes dynamically set).
ignored-classes=SQLObject
# When zope mode is activated, add a predefined set of Zope acquired attributes
# to generated-members.
zope=no
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed. Python regular
# expressions are accepted.
......@@ -131,9 +120,6 @@ generated-members=
[BASIC]
# Required attributes for module, separated by a comma
required-attributes=
# List of builtins function names that should not be used, separated by a comma
bad-functions=map,filter,apply,input
......@@ -275,10 +261,6 @@ max-public-methods=20
[CLASSES]
# List of interface methods to ignore, separated by a comma. This is used for
# instance to not check methods defines in Zope's Interface base class.
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp
......
......@@ -10,5 +10,5 @@ nose-ignore-docstring==0.2
nose==1.3.4
pep257==0.4.1
pep8==1.6.0
pylint==1.4.1
pylint==1.5.0
pytz==2014.10
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