Skip to content

Commit c76a1c0

Browse files
committed
reformat and typo fixes
1 parent 721b498 commit c76a1c0

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

curl_cffi/const.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,4 +611,3 @@ class CurlIpResolve(IntEnum):
611611
WHATEVER = 0 # default, uses addresses to all IP versions that your system allows
612612
V4 = 1 # uses only IPv4 addresses/connections
613613
V6 = 2 # uses only IPv6 addresses/connections
614-

curl_cffi/requests/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,12 @@ def set_curl_options(
536536
proxies = base_proxies
537537

538538
if proxies:
539+
539540
# Turn on proxy_credential_no_reuse, which has the following benefits:
540541
# 1. New connection will be made when proxy username changed
541542
# 2. New TLS session will be created based on proxy address, i.e. when accessing
542543
# the same site with different proxies, the TLS session won't leak previous IP.
543-
c.setopt(CurlOpt.PROXY_CREDETIAL_NO_REUSE, 1)
544+
c.setopt(CurlOpt.PROXY_CREDENTIAL_NO_REUSE, 1)
544545

545546
parts = urlparse(url)
546547
proxy = cast(Optional[str], proxies.get(parts.scheme, proxies.get("all")))
@@ -575,7 +576,6 @@ def set_curl_options(
575576
c.setopt(CurlOpt.PROXYUSERNAME, username.encode())
576577
c.setopt(CurlOpt.PROXYPASSWORD, password.encode())
577578

578-
579579
# verify
580580
base_verify, verify = verify_list
581581
if verify is False or not base_verify and verify is None:

curl_cffi/requests/websockets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ def _unpack_close_frame(frame: bytes) -> tuple[int, str]:
152152
) from e
153153
else:
154154
# TODO use constants instead of magic numbers
155-
if code < 3000 and (code not in WsCloseCode._value2member_map_ or code == 1005):
155+
if code < 3000 and (
156+
code not in WsCloseCode._value2member_map_ or code == 1005
157+
):
156158
raise WebSocketError(
157159
"Invalid close code", WsCloseCode.PROTOCOL_ERROR
158160
)

0 commit comments

Comments
 (0)