Skip to content

Commit

Permalink
Update Pylint version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Fogg committed Nov 30, 2015
1 parent 9ae3f85 commit fa79ad8
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 34 deletions.
2 changes: 1 addition & 1 deletion ecommerce/extensions/api/v2/views/publication.py
Expand Up @@ -24,7 +24,7 @@ def get_serializer_context(self):
def post(self, request, *args, **kwargs):
return self._save_and_publish(request.data)

def put(self, request, *args, **kwargs):
def put(self, request, *_args, **kwargs):
return self._save_and_publish(request.data, course_id=kwargs['course_id'])

def _save_and_publish(self, data, course_id=None):
Expand Down
2 changes: 1 addition & 1 deletion ecommerce/extensions/basket/models.py
Expand Up @@ -46,4 +46,4 @@ def __unicode__(self):


# noinspection PyUnresolvedReferences
from oscar.apps.basket.models import * # noqa pylint: disable=wildcard-import,unused-wildcard-import
from oscar.apps.basket.models import * # noqa pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-position
2 changes: 1 addition & 1 deletion ecommerce/extensions/catalogue/models.py
Expand Up @@ -30,4 +30,4 @@ def __unicode__(self):


# noinspection PyUnresolvedReferences
from oscar.apps.catalogue.models import * # noqa pylint: disable=wildcard-import,unused-wildcard-import
from oscar.apps.catalogue.models import * # noqa pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-position,ungrouped-imports
6 changes: 3 additions & 3 deletions ecommerce/extensions/catalogue/utils.py
Expand Up @@ -16,7 +16,7 @@ def generate_sku(product, partner):
getattr(product.attr, 'credit_provider', ''),
str(partner.id)
))
_hash = md5(_hash.lower())
_hash = _hash.hexdigest()[-7:]
md5_hash = md5(_hash.lower())
digest = md5_hash.hexdigest()[-7:]

return _hash.upper()
return digest.upper()
2 changes: 1 addition & 1 deletion ecommerce/extensions/checkout/signals.py
Expand Up @@ -2,14 +2,14 @@

import analytics
from django.dispatch import receiver
from oscar.core.loading import get_class
import waffle

from ecommerce.courses.utils import mode_for_seat
from ecommerce.extensions.analytics.utils import is_segment_configured, parse_tracking_context, silence_exceptions
from ecommerce.extensions.checkout.utils import get_provider_data
from ecommerce.notifications.notifications import send_notification
from ecommerce.settings import get_lms_url
from oscar.core.loading import get_class


logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion ecommerce/extensions/order/models.py
Expand Up @@ -25,4 +25,4 @@ class Line(AbstractLine):

# If two models with the same name are declared within an app, Django will only use the first one.
# noinspection PyUnresolvedReferences
from oscar.apps.order.models import * # noqa pylint: disable=wildcard-import,unused-wildcard-import
from oscar.apps.order.models import * # noqa pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-position,wrong-import-order,ungrouped-imports
2 changes: 1 addition & 1 deletion ecommerce/extensions/partner/models.py
Expand Up @@ -20,4 +20,4 @@ class Meta(object):


# noinspection PyUnresolvedReferences
from oscar.apps.partner.models import * # noqa pylint: disable=wildcard-import,unused-wildcard-import
from oscar.apps.partner.models import * # noqa pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-position,ungrouped-imports
2 changes: 1 addition & 1 deletion ecommerce/extensions/payment/admin.py
Expand Up @@ -26,4 +26,4 @@ def formatted_response(self, obj):
admin.site.register(PaymentProcessorResponse, PaymentProcessorResponseAdmin)

# noinspection PyUnresolvedReferences
from oscar.apps.payment.admin import * # noqa pylint: disable=wildcard-import,unused-wildcard-import
from oscar.apps.payment.admin import * # noqa pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-position
2 changes: 1 addition & 1 deletion ecommerce/extensions/payment/models.py
Expand Up @@ -32,4 +32,4 @@ class PaypalWebProfile(models.Model):


# noinspection PyUnresolvedReferences
from oscar.apps.payment.models import * # noqa pylint: disable=wildcard-import,unused-wildcard-import
from oscar.apps.payment.models import * # noqa pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-position,wrong-import-order
4 changes: 2 additions & 2 deletions ecommerce/extensions/payment/processors/paypal.py
Expand Up @@ -116,7 +116,7 @@ def get_transaction_parameters(self, basket, request=None):
# responsible for handling the exception.
if not payment.success():
error = self._get_error(payment)
entry = self.record_processor_response(error, transaction_id=error['debug_id'], basket=basket)
entry = self.record_processor_response(error, transaction_id=error['debug_id'], basket=basket) # pylint: disable=unsubscriptable-object

logger.error(
u"Failed to create PayPal payment for basket [%d]. PayPal's response was recorded in entry [%d].",
Expand Down Expand Up @@ -186,7 +186,7 @@ def handle_processor_response(self, response, basket=None):
# Raise an exception for payments that were not successfully executed. Consuming code is
# responsible for handling the exception
error = self._get_error(payment)
entry = self.record_processor_response(error, transaction_id=error['debug_id'], basket=basket)
entry = self.record_processor_response(error, transaction_id=error['debug_id'], basket=basket) # pylint: disable=unsubscriptable-object

logger.warning(
u"Failed to execute PayPal payment on attempt [%d]. "
Expand Down
2 changes: 1 addition & 1 deletion ecommerce/urls.py
Expand Up @@ -78,7 +78,7 @@ def handler403(_):
# Allow error pages to be tested

if os.environ.get('ENABLE_DJANGO_TOOLBAR', False):
import debug_toolbar # pylint: disable=import-error
import debug_toolbar # pylint: disable=import-error, wrong-import-position,wrong-import-order

urlpatterns += [
url(r'^__debug__/', include(debug_toolbar.urls))
Expand Down
19 changes: 0 additions & 19 deletions pylintrc
Expand Up @@ -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, wsgi.py
Expand Down Expand Up @@ -90,11 +87,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]

# Tells whether missing members accessed in mixin class should be ignored. A
Expand All @@ -105,10 +97,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.
Expand All @@ -130,9 +118,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

Expand Down Expand Up @@ -274,10 +259,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

Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Expand Up @@ -11,6 +11,6 @@ mock==1.3.0
mock-django==0.6.9
nose-ignore-docstring==0.2
pep8==1.6.2
pylint==1.4.4
pylint==1.5.0
selenium>=2.48.0
testfixtures==4.5.0

0 comments on commit fa79ad8

Please sign in to comment.