From 2ff58fcbd5c060dac3a7feec478819d2c5a164ec Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 28 Jul 2016 16:29:05 +0200 Subject: python: Drop superfluous imports and trim public interface. * lang/python/pyme/__init__.py: Avoid leaking low-level 'gpgme', make sure the main module looks nice and tidy, appease pyflakes. * lang/python/pyme/errors.py: Appease pyflakes. * lang/python/pyme/util.py: Avoid leaking low-level 'gpgme' into the module namespace. * lang/python/pyme/version.py.in: Likewise. * lang/python/tests/t-keylist.py: Drop superfluous imports. * lang/python/tests/t-sig-notation.py: Likewise. * lang/python/tests/t-sign.py: Likewise. * lang/python/tests/t-signers.py: Likewise. Signed-off-by: Justus Winter --- lang/python/pyme/__init__.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'lang/python/pyme/__init__.py') diff --git a/lang/python/pyme/__init__.py b/lang/python/pyme/__init__.py index c42f7945..f9e12d02 100644 --- a/lang/python/pyme/__init__.py +++ b/lang/python/pyme/__init__.py @@ -99,7 +99,24 @@ GPGME documentation: https://www.gnupg.org/documentation/manuals/gpgme/ """ -__all__ = ['core', 'errors', 'constants', 'util', 'callbacks', 'version'] - +from . import core +from . import errors +from . import constants +from . import util +from . import callbacks +from . import version from .core import Context from .core import Data + +# Interface hygiene. + +# Drop the low-level gpgme that creeps in for some reason. +gpgme = None +del gpgme + +# This is a white-list of symbols. Any other will alert pyflakes. +_ = [Context, Data, core, errors, constants, util, callbacks, version] +del _ + +__all__ = ["Context", "Data", + "core", "errors", "constants", "util", "callbacks", "version"] -- cgit v1.2.3