From 8006f48e22c971dc189b3cca8211b1da917c06ac Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 11 Aug 2024 12:49:30 -0400 Subject: [PATCH] Sort `__all__` (#1355) (As indicated by `ruff check --preview`) --- src/OpenSSL/SSL.py | 150 ++++++++++++++++++++-------------------- src/OpenSSL/__init__.py | 2 +- src/OpenSSL/crypto.py | 34 ++++----- 3 files changed, 93 insertions(+), 93 deletions(-) diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index 0b944caa5..6e4fb4f7c 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -50,105 +50,105 @@ ) __all__ = [ - "OPENSSL_VERSION_NUMBER", - "SSLEAY_VERSION", - "SSLEAY_CFLAGS", - "SSLEAY_PLATFORM", - "SSLEAY_DIR", - "SSLEAY_BUILT_ON", - "OPENSSL_VERSION", - "OPENSSL_CFLAGS", - "OPENSSL_PLATFORM", - "OPENSSL_DIR", - "OPENSSL_BUILT_ON", - "SENT_SHUTDOWN", - "RECEIVED_SHUTDOWN", - "SSLv23_METHOD", - "TLSv1_METHOD", - "TLSv1_1_METHOD", - "TLSv1_2_METHOD", - "TLS_METHOD", - "TLS_SERVER_METHOD", - "TLS_CLIENT_METHOD", + "DTLS_CLIENT_METHOD", "DTLS_METHOD", "DTLS_SERVER_METHOD", - "DTLS_CLIENT_METHOD", - "SSL3_VERSION", - "TLS1_VERSION", - "TLS1_1_VERSION", - "TLS1_2_VERSION", - "TLS1_3_VERSION", - "OP_NO_SSLv2", - "OP_NO_SSLv3", - "OP_NO_TLSv1", - "OP_NO_TLSv1_1", - "OP_NO_TLSv1_2", - "OP_NO_TLSv1_3", "MODE_RELEASE_BUFFERS", - "OP_SINGLE_DH_USE", - "OP_SINGLE_ECDH_USE", + "NO_OVERLAPPING_PROTOCOLS", + "OPENSSL_BUILT_ON", + "OPENSSL_CFLAGS", + "OPENSSL_DIR", + "OPENSSL_PLATFORM", + "OPENSSL_VERSION", + "OPENSSL_VERSION_NUMBER", + "OP_ALL", + "OP_CIPHER_SERVER_PREFERENCE", + "OP_COOKIE_EXCHANGE", + "OP_DONT_INSERT_EMPTY_FRAGMENTS", "OP_EPHEMERAL_RSA", - "OP_MICROSOFT_SESS_ID_BUG", - "OP_NETSCAPE_CHALLENGE_BUG", - "OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG", - "OP_SSLREF2_REUSE_CERT_TYPE_BUG", "OP_MICROSOFT_BIG_SSLV3_BUFFER", + "OP_MICROSOFT_SESS_ID_BUG", "OP_MSIE_SSLV2_RSA_PADDING", - "OP_SSLEAY_080_CLIENT_DH_BUG", - "OP_TLS_D5_BUG", - "OP_TLS_BLOCK_PADDING_BUG", - "OP_DONT_INSERT_EMPTY_FRAGMENTS", - "OP_CIPHER_SERVER_PREFERENCE", - "OP_TLS_ROLLBACK_BUG", - "OP_PKCS1_CHECK_1", - "OP_PKCS1_CHECK_2", "OP_NETSCAPE_CA_DN_BUG", + "OP_NETSCAPE_CHALLENGE_BUG", "OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG", + "OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG", "OP_NO_COMPRESSION", "OP_NO_QUERY_MTU", - "OP_COOKIE_EXCHANGE", "OP_NO_TICKET", - "OP_ALL", - "VERIFY_PEER", - "VERIFY_FAIL_IF_NO_PEER_CERT", - "VERIFY_CLIENT_ONCE", - "VERIFY_NONE", - "SESS_CACHE_OFF", - "SESS_CACHE_CLIENT", - "SESS_CACHE_SERVER", + "OP_PKCS1_CHECK_1", + "OP_PKCS1_CHECK_2", + "OP_SINGLE_DH_USE", + "OP_SINGLE_ECDH_USE", + "OP_SSLEAY_080_CLIENT_DH_BUG", + "OP_SSLREF2_REUSE_CERT_TYPE_BUG", + "OP_TLS_BLOCK_PADDING_BUG", + "OP_TLS_D5_BUG", + "OP_TLS_ROLLBACK_BUG", + "RECEIVED_SHUTDOWN", + "SENT_SHUTDOWN", "SESS_CACHE_BOTH", + "SESS_CACHE_CLIENT", "SESS_CACHE_NO_AUTO_CLEAR", + "SESS_CACHE_NO_INTERNAL", "SESS_CACHE_NO_INTERNAL_LOOKUP", "SESS_CACHE_NO_INTERNAL_STORE", - "SESS_CACHE_NO_INTERNAL", - "SSL_ST_CONNECT", - "SSL_ST_ACCEPT", - "SSL_ST_MASK", - "SSL_CB_LOOP", + "SESS_CACHE_OFF", + "SESS_CACHE_SERVER", + "SSL3_VERSION", + "SSLEAY_BUILT_ON", + "SSLEAY_CFLAGS", + "SSLEAY_DIR", + "SSLEAY_PLATFORM", + "SSLEAY_VERSION", + "SSL_CB_ACCEPT_EXIT", + "SSL_CB_ACCEPT_LOOP", + "SSL_CB_ALERT", + "SSL_CB_CONNECT_EXIT", + "SSL_CB_CONNECT_LOOP", "SSL_CB_EXIT", + "SSL_CB_HANDSHAKE_DONE", + "SSL_CB_HANDSHAKE_START", + "SSL_CB_LOOP", "SSL_CB_READ", - "SSL_CB_WRITE", - "SSL_CB_ALERT", "SSL_CB_READ_ALERT", + "SSL_CB_WRITE", "SSL_CB_WRITE_ALERT", - "SSL_CB_ACCEPT_LOOP", - "SSL_CB_ACCEPT_EXIT", - "SSL_CB_CONNECT_LOOP", - "SSL_CB_CONNECT_EXIT", - "SSL_CB_HANDSHAKE_START", - "SSL_CB_HANDSHAKE_DONE", + "SSL_ST_ACCEPT", + "SSL_ST_CONNECT", + "SSL_ST_MASK", + "TLS1_1_VERSION", + "TLS1_2_VERSION", + "TLS1_3_VERSION", + "TLS1_VERSION", + "TLS_CLIENT_METHOD", + "TLS_METHOD", + "TLS_SERVER_METHOD", + "VERIFY_CLIENT_ONCE", + "VERIFY_FAIL_IF_NO_PEER_CERT", + "VERIFY_NONE", + "VERIFY_PEER", + "Connection", + "Context", "Error", + "OP_NO_SSLv2", + "OP_NO_SSLv3", + "OP_NO_TLSv1", + "OP_NO_TLSv1_1", + "OP_NO_TLSv1_2", + "OP_NO_TLSv1_3", + "SSLeay_version", + "SSLv23_METHOD", + "Session", + "SysCallError", + "TLSv1_1_METHOD", + "TLSv1_2_METHOD", + "TLSv1_METHOD", "WantReadError", "WantWriteError", "WantX509LookupError", - "ZeroReturnError", - "SysCallError", - "NO_OVERLAPPING_PROTOCOLS", - "SSLeay_version", - "Session", - "Context", - "Connection", "X509VerificationCodes", + "ZeroReturnError", ] diff --git a/src/OpenSSL/__init__.py b/src/OpenSSL/__init__.py index 2442ee6f0..7b077cf70 100644 --- a/src/OpenSSL/__init__.py +++ b/src/OpenSSL/__init__.py @@ -19,7 +19,6 @@ __all__ = [ "SSL", - "crypto", "__author__", "__copyright__", "__email__", @@ -28,4 +27,5 @@ "__title__", "__uri__", "__version__", + "crypto", ] diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index c5118422d..be0a98963 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -50,37 +50,37 @@ ) __all__ = [ - "FILETYPE_PEM", + "CRL", "FILETYPE_ASN1", + "FILETYPE_PEM", "FILETYPE_TEXT", - "TYPE_RSA", "TYPE_DSA", + "TYPE_RSA", + "X509", "Error", "PKey", - "get_elliptic_curves", - "get_elliptic_curve", - "X509Name", + "Revoked", "X509Extension", + "X509Name", "X509Req", - "X509", - "X509StoreFlags", "X509Store", - "X509StoreContextError", "X509StoreContext", - "load_certificate", + "X509StoreContextError", + "X509StoreFlags", "dump_certificate", - "dump_publickey", - "dump_privatekey", - "Revoked", - "CRL", - "load_publickey", - "load_privatekey", "dump_certificate_request", + "dump_crl", + "dump_privatekey", + "dump_publickey", + "get_elliptic_curve", + "get_elliptic_curves", + "load_certificate", "load_certificate_request", + "load_crl", + "load_privatekey", + "load_publickey", "sign", "verify", - "dump_crl", - "load_crl", ]