diff options
author | whiteowl3 <71030468+whiteowl3@users.noreply.github.com> | 2022-03-01 22:23:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-02 11:23:38 +0800 |
commit | 99911f75f110409742eaf710a178ff0201f9b4a9 (patch) | |
tree | bfd71c6a2927bc0d306fe349f0b1f63e97d4adee /src/OpenSSL | |
parent | bb40cf2985d1319afaab84bf545aa2bd95ba23a5 (diff) | |
download | pyopenssl-99911f75f110409742eaf710a178ff0201f9b4a9.tar.gz |
flake8-import-order (#1099)
* flake8-import-order
* make sure bad import orders fail
* flake8-import-order
* add application name to flake8 section
* correct import order for openssl as application
Diffstat (limited to 'src/OpenSSL')
-rw-r--r-- | src/OpenSSL/SSL.py | 13 | ||||
-rw-r--r-- | src/OpenSSL/__init__.py | 2 | ||||
-rw-r--r-- | src/OpenSSL/crypto.py | 11 | ||||
-rw-r--r-- | src/OpenSSL/debug.py | 4 |
4 files changed, 16 insertions, 14 deletions
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index 6064233..97eee20 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -1,10 +1,10 @@ import os import socket +from errno import errorcode +from functools import partial, wraps +from itertools import chain, count from sys import platform -from functools import wraps, partial -from itertools import count, chain from weakref import WeakValueDictionary -from errno import errorcode from OpenSSL._util import ( UNSPECIFIED as _UNSPECIFIED, @@ -12,18 +12,17 @@ from OpenSSL._util import ( ffi as _ffi, lib as _lib, make_assert as _make_assert, + no_zero_allocator as _no_zero_allocator, path_bytes as _path_bytes, text_to_bytes_and_warn as _text_to_bytes_and_warn, - no_zero_allocator as _no_zero_allocator, ) - from OpenSSL.crypto import ( FILETYPE_PEM, - _PassphraseHelper, PKey, - X509Name, X509, + X509Name, X509Store, + _PassphraseHelper, ) __all__ = [ diff --git a/src/OpenSSL/__init__.py b/src/OpenSSL/__init__.py index 11e896a..0af3acd 100644 --- a/src/OpenSSL/__init__.py +++ b/src/OpenSSL/__init__.py @@ -5,7 +5,7 @@ pyOpenSSL - A simple wrapper around the OpenSSL library """ -from OpenSSL import crypto, SSL +from OpenSSL import SSL, crypto from OpenSSL.version import ( __author__, __copyright__, diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index 79f7f4b..5b09d10 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -1,7 +1,7 @@ import calendar import datetime -from base64 import b16encode import functools +from base64 import b16encode from functools import partial from cryptography import utils, x509 @@ -14,16 +14,17 @@ from cryptography.hazmat.primitives.asymmetric import ( ) from OpenSSL._util import ( + UNSPECIFIED as _UNSPECIFIED, + byte_string as _byte_string, + exception_from_error_queue as _exception_from_error_queue, ffi as _ffi, lib as _lib, - exception_from_error_queue as _exception_from_error_queue, - byte_string as _byte_string, + make_assert as _make_assert, path_bytes as _path_bytes, - UNSPECIFIED as _UNSPECIFIED, text_to_bytes_and_warn as _text_to_bytes_and_warn, - make_assert as _make_assert, ) + __all__ = [ "FILETYPE_PEM", "FILETYPE_ASN1", diff --git a/src/OpenSSL/debug.py b/src/OpenSSL/debug.py index 988b92a..e39b128 100644 --- a/src/OpenSSL/debug.py +++ b/src/OpenSSL/debug.py @@ -3,10 +3,12 @@ from __future__ import print_function import ssl import sys -import OpenSSL.SSL import cffi + import cryptography +import OpenSSL.SSL + from . import version |