Skip to content

Commit dc9191d

Browse files
committed
Applying Copilot's review comments
1 parent e013954 commit dc9191d

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
@@ -1392,8 +1392,8 @@ def __init__(
13921392
]
13931393
Example:
13941394
[
1395-
(ssl.VERIFY_X509_STRICT, False), # disable strict
1396-
(ssl.VERIFY_X509_PARTIAL_CHAIN, True), # ensure partial chain is enabled
1395+
(ssl.VerifyFlags.VERIFY_X509_STRICT, False), # disable strict
1396+
(ssl.VerifyFlags.VERIFY_X509_PARTIAL_CHAIN, True), # ensure partial chain is enabled
13971397
]
13981398
ssl_ca_certs: The path to a file of concatenated CA certificates in PEM format. Defaults to None.
13991399
ssl_ca_data: Either an ASCII string of one or more PEM-encoded certificates or a bytes-like object of DER-encoded certificates.
@@ -1660,15 +1660,15 @@ def parse_url(url):
16601660
if "ssl_verify_flags_config" in kwargs:
16611661
# flags are passed in as a string representation of a list,
16621662
# e.g. [(VERIFY_X509_STRICT, False), (VERIFY_X509_PARTIAL_CHAIN, True)]
1663-
# To parse it sucessfully, we need transform the flags to strings with quotes.
1663+
# To parse it successfully, we need to transform the flags to strings with quotes.
16641664
verify_flags_config_str = kwargs.pop("ssl_verify_flags_config")
16651665
# First wrap any VERIFY_* name in quotes
16661666
verify_flags_config_str = re.sub(
16671667
r"\b(VERIFY_[A-Z0-9_]+)\b", r'"\1"', verify_flags_config_str
16681668
)
16691669

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

16741674
ssl_verify_flags_config_parsed = []

0 commit comments

Comments
 (0)