From 210009bbfe699eb252a815887b818438ccdd52ca Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Fri, 8 Dec 2017 19:28:05 -0800 Subject: [PATCH] Review feedback. --- acme/acme/client.py | 11 ++++++----- acme/acme/client_test.py | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/acme/acme/client.py b/acme/acme/client.py index c3a603b7e..ba5405b35 100644 --- a/acme/acme/client.py +++ b/acme/acme/client.py @@ -48,7 +48,7 @@ class Client(object): # pylint: disable=too-many-instance-attributes :ivar messages.Directory directory: :ivar key: `.JWK` (private) - :ivar account: `.Account` (private) + :ivar account: `.Registration` (private) :ivar acme_version: `int` (private) :ivar alg: `.JWASignature` :ivar bool verify_ssl: Verify SSL certificates? @@ -58,7 +58,6 @@ class Client(object): # pylint: disable=too-many-instance-attributes """ - # pylint: disable=too-many-arguments def __init__(self, directory, key, account=None, acme_version=1, alg=jose.RS256, verify_ssl=True, net=None): """Initialize. @@ -67,6 +66,7 @@ class Client(object): # pylint: disable=too-many-instance-attributes URI from which the resource will be downloaded. """ + # pylint: disable=too-many-arguments self.key = key self.account = account self.acme_version = acme_version @@ -518,10 +518,10 @@ class ClientNetwork(object): # pylint: disable=too-many-instance-attributes JSON_ERROR_CONTENT_TYPE = 'application/problem+json' REPLAY_NONCE_HEADER = 'Replay-Nonce' - # pylint: disable=too-many-arguments def __init__(self, key, account=None, alg=jose.RS256, verify_ssl=True, user_agent='acme-python', timeout=DEFAULT_NETWORK_TIMEOUT, - acme_version=2): + acme_version=1): + # pylint: disable=too-many-arguments self.key = key self.account = account self.alg = alg @@ -546,6 +546,7 @@ class ClientNetwork(object): # pylint: disable=too-many-instance-attributes .. todo:: Implement ``acmePath``. :param .JSONDeSerializable obj: + :param str url: The URL to which this object will be POSTed :param bytes nonce: :rtype: `.JWS` @@ -556,7 +557,7 @@ class ClientNetwork(object): # pylint: disable=too-many-instance-attributes "alg": self.alg, "nonce": nonce } - if self.acme_version is 2: + if self.acme_version == 2: # new ACME spec kwargs["url"] = url if self.account is not None: diff --git a/acme/acme/client_test.py b/acme/acme/client_test.py index 7618dd941..9b57ed9f2 100644 --- a/acme/acme/client_test.py +++ b/acme/acme/client_test.py @@ -464,7 +464,6 @@ class MockJSONDeSerializable(jose.JSONDeSerializable): class ClientNetworkTest(unittest.TestCase): """Tests for acme.client.ClientNetwork.""" - # pylint: disable=too-many-public-methods def setUp(self): self.verify_ssl = mock.MagicMock()