From 12badcabc1cd345256a4902f7b0583cf667ecd8d Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 11 Aug 2015 20:55:48 +0200 Subject: Make pki PEP 8 compatible Large portions of the patch was automatically created with autopep8: find base/ -name '*.py' | xargs autopep8 --in-place --ignore E309 \ --aggressive find base/common/upgrade base/server/upgrade -type f -and \ -not -name .gitignore | autopep8 --in-place --ignore E309 --aggressive autopep8 --in-place --ignore E309 --aggressive \ base/common/sbin/pki-upgrade \ base/server/sbin/pkispawn \ base/server/sbin/pkidestroy \ base/server/sbin/pki-server \ base/server/sbin/pki-server-upgrade About two dozent violations were fixed manually. https://fedorahosted.org/pki/ticket/708 --- base/common/python/pki/encoder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'base/common/python/pki/encoder.py') diff --git a/base/common/python/pki/encoder.py b/base/common/python/pki/encoder.py index 84bf32506..6d5725f0f 100644 --- a/base/common/python/pki/encoder.py +++ b/base/common/python/pki/encoder.py @@ -32,6 +32,7 @@ class CustomTypeEncoder(json.JSONEncoder): when-instance-variable-name-is-same-as-method-name """ # pylint: disable=E0202 + def default(self, obj): for k, v in TYPES.iteritems(): if isinstance(obj, v): @@ -56,7 +57,7 @@ class CustomTypeEncoder(json.JSONEncoder): return new_dict -def CustomTypeDecoder(dct): +def CustomTypeDecoder(dct): # nopep8 if len(dct) == 1: type_name, value = dct.items()[0] if type_name in TYPES: -- cgit