diff options
author | Dan McGee <dan@archlinux.org> | 2012-11-16 16:20:11 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-11-16 16:37:52 -0600 |
commit | 6dd4d54bb0adbbb0f8c2b1beaa92b7a58971cf88 (patch) | |
tree | ce20ff9bf1118c8d383eed352bcdcbf064cb5269 /public/views.py | |
parent | b3979dd2315ce1aef779abdb646562d7bba7a44f (diff) |
Use Python 2.7 dictionary comprehension syntax
Rather than the old idiom of dict((k, v) for <> in <>).
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'public/views.py')
-rw-r--r-- | public/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/public/views.py b/public/views.py index 96120761..3e15f9df 100644 --- a/public/views.py +++ b/public/views.py @@ -118,7 +118,7 @@ def keys(request): sig_counts = PGPSignature.objects.filter(not_expired, valid=True, signee__in=user_key_ids).values_list('signer').annotate( Count('signer')) - sig_counts = dict((key_id[-16:], ct) for key_id, ct in sig_counts) + sig_counts = {key_id[-16:]: ct for key_id, ct in sig_counts} for key in master_keys: key.signature_count = sig_counts.get(key.pgp_key[-16:], 0) |