Skip to content

Commit 88fed8d

Browse files
committed
Applying Copilot's review comments
1 parent cb8767d commit 88fed8d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

redis/asyncio/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,15 +1043,15 @@ def parse_url(url: str) -> ConnectKwargs:
10431043
if "ssl_verify_flags_config" in kwargs:
10441044
# flags are passed in as a string representation of a list,
10451045
# e.g. [(VERIFY_X509_STRICT, False), (VERIFY_X509_PARTIAL_CHAIN, True)]
1046-
# To parse it sucessfully, we need transform the flags to strings with quotes.
1046+
# To parse it successfully, we need to transform the flags to strings with quotes.
10471047
verify_flags_config_str = kwargs.pop("ssl_verify_flags_config")
10481048
# First wrap any VERIFY_* name in quotes
10491049
verify_flags_config_str = re.sub(
10501050
r"\b(VERIFY_[A-Z0-9_]+)\b", r'"\1"', verify_flags_config_str
10511051
)
10521052

10531053
# transform the string to a list of tuples - the first element of each tuple is a string containing the name of the flag,
1054-
# and the second is a boolean that indicates if the flad should be enabled or disabled
1054+
# and the second is a boolean that indicates if the flag should be enabled or disabled
10551055
verify_flags_config = ast.literal_eval(verify_flags_config_str)
10561056

10571057
verify_flags_config_config_parsed = []

redis/connection.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,8 +1394,8 @@ def __init__(
13941394
]
13951395
Example:
13961396
[
1397-
(ssl.VERIFY_X509_STRICT, False), # disable strict
1398-
(ssl.VERIFY_X509_PARTIAL_CHAIN, True), # ensure partial chain is enabled
1397+
(ssl.VerifyFlags.VERIFY_X509_STRICT, False), # disable strict
1398+
(ssl.VerifyFlags.VERIFY_X509_PARTIAL_CHAIN, True), # ensure partial chain is enabled
13991399
]
14001400
ssl_ca_certs: The path to a file of concatenated CA certificates in PEM format. Defaults to None.
14011401
ssl_ca_data: Either an ASCII string of one or more PEM-encoded certificates or a bytes-like object of DER-encoded certificates.
@@ -1662,15 +1662,15 @@ def parse_url(url):
16621662
if "ssl_verify_flags_config" in kwargs:
16631663
# flags are passed in as a string representation of a list,
16641664
# e.g. [(VERIFY_X509_STRICT, False), (VERIFY_X509_PARTIAL_CHAIN, True)]
1665-
# To parse it sucessfully, we need transform the flags to strings with quotes.
1665+
# To parse it successfully, we need to transform the flags to strings with quotes.
16661666
verify_flags_config_str = kwargs.pop("ssl_verify_flags_config")
16671667
# First wrap any VERIFY_* name in quotes
16681668
verify_flags_config_str = re.sub(
16691669
r"\b(VERIFY_[A-Z0-9_]+)\b", r'"\1"', verify_flags_config_str
16701670
)
16711671

16721672
# transform the string to a list of tuples - the first element of each tuple is a string containing the name of the flag,
1673-
# and the second is a boolean that indicates if the flad should be enabled or disabled
1673+
# and the second is a boolean that indicates if the flag should be enabled or disabled
16741674
verify_flags_config = ast.literal_eval(verify_flags_config_str)
16751675

16761676
ssl_verify_flags_config_parsed = []

0 commit comments

Comments
 (0)