aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/src/constants/__init__.py
diff options
context:
space:
mode:
authorBen McGinnes <[email protected]>2018-08-18 07:36:23 +0200
committerBen McGinnes <[email protected]>2018-08-18 07:36:23 +0200
commit8a6a73b9c4f92b159450edb5e4a780fc7389ca82 (patch)
treeea28f65ae64a05eb7e993cca9ee8c5e1f8fa473f /lang/python/src/constants/__init__.py
parentPython bindings src: PEP8 compliance (diff)
downloadgpgme-8a6a73b9c4f92b159450edb5e4a780fc7389ca82.tar.gz
gpgme-8a6a73b9c4f92b159450edb5e4a780fc7389ca82.zip
Python bindings constants: PEP8 compliance (almost)
* PEP8 compliance for all constants except the globals in src/constants/__init__.py depending on whether the import sequence affects the globals themselves.
Diffstat (limited to 'lang/python/src/constants/__init__.py')
-rw-r--r--lang/python/src/constants/__init__.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lang/python/src/constants/__init__.py b/lang/python/src/constants/__init__.py
index da373958..7a953aab 100644
--- a/lang/python/src/constants/__init__.py
+++ b/lang/python/src/constants/__init__.py
@@ -18,15 +18,19 @@
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import, print_function, unicode_literals
-del absolute_import, print_function, unicode_literals
from gpg import util
+# Globals may need to be set prior to module import, if so this prevents PEP8
+# compliance, but better that than code breakage.
util.process_constants('GPGME_', globals())
-del util
# For convenience, we import the modules here.
from . import data, keylist, sig, tofu # The subdirs.
-from . import create, event, keysign, md, pk, protocol, sigsum, status, validity
+# The remaining modules can no longer fit on one line.
+from . import create, event, keysign, md, pk, protocol, sigsum, status
+from . import validity
+
+del absolute_import, print_function, unicode_literals, util
# A complication arises because 'import' is a reserved keyword.
# Import it as 'Import' instead.