Skip to content

Commit 9cfad4c

Browse files
authored
Small cleanup (#275)
* Small cleanup.
1 parent e529319 commit 9cfad4c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

mocket/ssl/socket.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import ssl
44
from datetime import datetime, timedelta
5+
from ssl import Options
56
from typing import Any
67

78
from mocket.compat import encode_to_bytes
@@ -53,9 +54,9 @@ def getpeercert(self, binary_form: bool = False) -> _PeerCertRetDictType:
5354
}
5455

5556
def ciper(self) -> tuple[str, str, str]:
56-
return ("ADH", "AES256", "SHA")
57+
return "ADH", "AES256", "SHA"
5758

58-
def compression(self) -> str | None:
59+
def compression(self) -> Options:
5960
return ssl.OP_NO_COMPRESSION
6061

6162
def unwrap(self) -> MocketSocket:

mocket/utils.py

-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
from __future__ import annotations
22

33
import binascii
4-
import ssl
54
from typing import Callable
65

76
from mocket.compat import decode_from_bytes, encode_to_bytes
87

9-
SSL_PROTOCOL = ssl.PROTOCOL_TLSv1_2
10-
118

129
def hexdump(binary_string: bytes) -> str:
1310
r"""
@@ -42,7 +39,6 @@ def get_mocketize(wrapper_: Callable) -> Callable:
4239

4340

4441
__all__ = (
45-
"SSL_PROTOCOL",
4642
"get_mocketize",
4743
"hexdump",
4844
"hexload",

0 commit comments

Comments
 (0)