diff options
| author | Ben McGinnes <[email protected]> | 2018-08-10 01:25:01 +0000 |
|---|---|---|
| committer | Ben McGinnes <[email protected]> | 2018-08-10 01:25:01 +0000 |
| commit | 94bf13e78e65e1d1bc2e5d6b2311f9c9657bfe5f (patch) | |
| tree | ea23101d276096ece7c4eb656fe1c70611953c6d /lang/python/src/constants | |
| parent | Link fixes (diff) | |
| download | gpgme-94bf13e78e65e1d1bc2e5d6b2311f9c9657bfe5f.tar.gz gpgme-94bf13e78e65e1d1bc2e5d6b2311f9c9657bfe5f.zip | |
PEP8 compliance and other code fixes
* Ran all the .py files in src/ and below through Yapf.
* Included some manual edits of core.py, this time successfully making
two notorious sections a bit more pythonic than scheming.
* Left the module imports as is.
* This will be committed if it passes the most essential test:
compiling, installing and running it.
Signed-off-by: Ben McGinnes <[email protected]>
Diffstat (limited to 'lang/python/src/constants')
| -rw-r--r-- | lang/python/src/constants/__init__.py | 12 | ||||
| -rw-r--r-- | lang/python/src/constants/data/__init__.py | 1 | ||||
| -rw-r--r-- | lang/python/src/constants/keylist/__init__.py | 1 | ||||
| -rw-r--r-- | lang/python/src/constants/sig/__init__.py | 1 |
4 files changed, 7 insertions, 8 deletions
diff --git a/lang/python/src/constants/__init__.py b/lang/python/src/constants/__init__.py index 484ffd29..da373958 100644 --- a/lang/python/src/constants/__init__.py +++ b/lang/python/src/constants/__init__.py @@ -25,16 +25,18 @@ util.process_constants('GPGME_', globals()) del util # For convenience, we import the modules here. -from . import data, keylist, sig, tofu # The subdirs. +from . import data, keylist, sig, tofu # The subdirs. from . import create, event, keysign, md, pk, protocol, sigsum, status, validity # A complication arises because 'import' is a reserved keyword. # Import it as 'Import' instead. -globals()['Import'] = getattr(__import__('', globals(), locals(), - [str('import')], 1), "import") +globals()['Import'] = getattr( + __import__('', globals(), locals(), [str('import')], 1), "import") -__all__ = ['data', 'event', 'import', 'keysign', 'keylist', 'md', 'pk', - 'protocol', 'sig', 'sigsum', 'status', 'tofu', 'validity', 'create'] +__all__ = [ + 'data', 'event', 'import', 'keysign', 'keylist', 'md', 'pk', 'protocol', + 'sig', 'sigsum', 'status', 'tofu', 'validity', 'create' +] # GPGME 1.7 replaced gpgme_op_edit with gpgme_op_interact. We # implement gpg.Context.op_edit using gpgme_op_interact, so the diff --git a/lang/python/src/constants/data/__init__.py b/lang/python/src/constants/data/__init__.py index 8274ab91..b864b7cd 100644 --- a/lang/python/src/constants/data/__init__.py +++ b/lang/python/src/constants/data/__init__.py @@ -1,4 +1,3 @@ - from __future__ import absolute_import, print_function, unicode_literals del absolute_import, print_function, unicode_literals diff --git a/lang/python/src/constants/keylist/__init__.py b/lang/python/src/constants/keylist/__init__.py index 2ce0edfd..9d1e2d57 100644 --- a/lang/python/src/constants/keylist/__init__.py +++ b/lang/python/src/constants/keylist/__init__.py @@ -1,4 +1,3 @@ - from __future__ import absolute_import, print_function, unicode_literals del absolute_import, print_function, unicode_literals diff --git a/lang/python/src/constants/sig/__init__.py b/lang/python/src/constants/sig/__init__.py index 39d4e6e1..fc34f8e4 100644 --- a/lang/python/src/constants/sig/__init__.py +++ b/lang/python/src/constants/sig/__init__.py @@ -1,4 +1,3 @@ - from __future__ import absolute_import, print_function, unicode_literals del absolute_import, print_function, unicode_literals |
