diff options
author | Mads Jensen <mje@inducks.org> | 2020-10-01 15:42:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 15:42:37 +0300 |
commit | c12404451dc49dea4277f319d78abe0a5247bc6b (patch) | |
tree | 630dde5aa6f5ff5982a326dbc0eca71f4af0a84f /acme | |
parent | e378931eda6ce6bcd9059959c4b3b790f41a203d (diff) |
Converted dict comprehensions to use literals. (#8342)
Diffstat (limited to 'acme')
-rw-r--r-- | acme/acme/client.py | 2 | ||||
-rw-r--r-- | acme/acme/messages.py | 4 | ||||
-rw-r--r-- | acme/acme/util.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/acme/acme/client.py b/acme/acme/client.py index f66367c38..d52c84373 100644 --- a/acme/acme/client.py +++ b/acme/acme/client.py @@ -448,7 +448,7 @@ class Client(ClientBase): heapq.heapify(waiting) # mapping between original Authorization Resource and the most # recently updated one - updated = dict((authzr, authzr) for authzr in authzrs) + updated = {authzr: authzr for authzr in authzrs} while waiting: # find the smallest Retry-After, and sleep if necessary diff --git a/acme/acme/messages.py b/acme/acme/messages.py index 8c9bf9701..6325ed57f 100644 --- a/acme/acme/messages.py +++ b/acme/acme/messages.py @@ -206,7 +206,7 @@ class Directory(jose.JSONDeSerializable): external_account_required = jose.Field('externalAccountRequired', omitempty=True) def __init__(self, **kwargs): - kwargs = dict((self._internal_name(k), v) for k, v in kwargs.items()) + kwargs = {self._internal_name(k): v for k, v in kwargs.items()} super(Directory.Meta, self).__init__(**kwargs) @property @@ -465,7 +465,7 @@ class ChallengeBody(ResourceBody): omitempty=True, default=None) def __init__(self, **kwargs): - kwargs = dict((self._internal_name(k), v) for k, v in kwargs.items()) + kwargs = {self._internal_name(k): v for k, v in kwargs.items()} super(ChallengeBody, self).__init__(**kwargs) def encode(self, name): diff --git a/acme/acme/util.py b/acme/acme/util.py index 1fff89a9e..b3b0d79eb 100644 --- a/acme/acme/util.py +++ b/acme/acme/util.py @@ -4,4 +4,4 @@ import six def map_keys(dikt, func): """Map dictionary keys.""" - return dict((func(key), value) for key, value in six.iteritems(dikt)) + return {func(key): value for key, value in six.iteritems(dikt)} |