summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-07-29 16:27:54 -0400
committerKali Kaneko <kali@leap.se>2015-07-29 16:27:54 -0400
commit5c967b8c236900f93147b7d286a080d650a9e5d0 (patch)
tree68e1d57ff8baa0ea762df5f22d1d0f03fd6f0380
parent8e1c3fa849d78bede4a2673588bd619330ee404c (diff)
[style] pep8
-rw-r--r--src/leap/keymanager/__init__.py15
-rw-r--r--src/leap/keymanager/tests/test_keymanager.py3
-rw-r--r--src/leap/keymanager/tests/test_validation.py3
3 files changed, 8 insertions, 13 deletions
diff --git a/src/leap/keymanager/__init__.py b/src/leap/keymanager/__init__.py
index 56633c5d..282ff48c 100644
--- a/src/leap/keymanager/__init__.py
+++ b/src/leap/keymanager/__init__.py
@@ -71,10 +71,12 @@ from leap.keymanager.keys import (
KEYMANAGER_KEY_TAG,
TAGS_PRIVATE_INDEX,
)
-from leap.keymanager.openpgp import (
- OpenPGPKey,
- OpenPGPScheme,
-)
+from leap.keymanager.openpgp import OpenPGPKey, OpenPGPScheme
+
+from ._version import get_versions
+
+__version__ = get_versions()['version']
+del get_versions
logger = logging.getLogger(__name__)
@@ -828,8 +830,3 @@ def _get_domain(url):
:rtype: str
"""
return urlparse(url).hostname
-
-
-from ._version import get_versions
-__version__ = get_versions()['version']
-del get_versions
diff --git a/src/leap/keymanager/tests/test_keymanager.py b/src/leap/keymanager/tests/test_keymanager.py
index 08d37500..a12cac0e 100644
--- a/src/leap/keymanager/tests/test_keymanager.py
+++ b/src/leap/keymanager/tests/test_keymanager.py
@@ -388,9 +388,8 @@ class KeyManagerCryptoTestCase(KeyManagerWithSoledadTestCase):
sign=ADDRESS, fetch_remote=False))
return self.assertFailure(d, KeyNotFound)
-
-import unittest
if __name__ == "__main__":
+ import unittest
unittest.main()
# key 0F91B402: someone@somedomain.org
diff --git a/src/leap/keymanager/tests/test_validation.py b/src/leap/keymanager/tests/test_validation.py
index 0c1d155f..561ca505 100644
--- a/src/leap/keymanager/tests/test_validation.py
+++ b/src/leap/keymanager/tests/test_validation.py
@@ -339,7 +339,6 @@ X2+l7IOSt+31KQCBFN/VmhTySJOVQC1d2A56lSH2c/DWVClji+x3suzn
-----END PGP PUBLIC KEY BLOCK-----
"""
-
-import unittest
if __name__ == "__main__":
+ import unittest
unittest.main()