Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Minor fixes based on pyflakes output

* Unneeded imports
* A function from utils that wasn't imported correctly
  • Loading branch information...
commit 42fd80ed23039aa1f0401de81c7a59ec153aeb0c 1 parent 02ba68f
@codeinthehole codeinthehole authored
9 gocardless/
@@ -1,14 +1,9 @@
import base64
-import datetime
-import json
import logging
-import os
-import urllib
-import urlparse
import gocardless
import urlbuilder
-from gocardless.utils import generate_signature, to_query
+from gocardless.utils import generate_signature, to_query, signature_valid
from gocardless.request import Request
from gocardless.exceptions import ClientError, SignatureError
from gocardless.resources import Merchant, Subscription, Bill, PreAuthorization, User
@@ -389,5 +384,5 @@ def validate_webhook(self, params):
:param params: A dictionary of data to validate, must include
the key "signature"
- utils.signature_valid(params, self._app_secret)
+ signature_valid(params, self._app_secret)
6 gocardless/
@@ -1,6 +1,4 @@
import datetime
-import json
-import logging
import re
import sys
import types
@@ -19,6 +17,7 @@ def __new__(meta, name, bases, attrs):
return type.__new__(meta, name, bases, attrs)
class Resource(object):
"""A GoCardless resource
@@ -123,11 +122,11 @@ def find(cls, id):
return cls.find_with_client(id, gocardless.client)
class Merchant(Resource):
endpoint = "/merchants/:id"
date_fields = ["next_payout_date"]
class Subscription(Resource):
endpoint = "/subscriptions/:id"
reference_fields = ["user_id", "merchant_id"]
@@ -147,6 +146,7 @@ def create_bill(self, amount, name=None, description=None):
return Bill.create_under_preauth(amount,, self.client,
name=name, description=description)
class Bill(Resource):
endpoint = "/bills/:id"
date_fields = ["paid_at"]
1  gocardless/
@@ -1,7 +1,6 @@
import base64
import datetime
import os
-import urlparse
import utils
class UrlBuilder(object):
Please sign in to comment.
Something went wrong with that request. Please try again.