Update pyupgrade and black.
MODIFY
.pre-commit-config.yaml
.pre-commit-config.yaml
repos:
- repo: https://github.com/asottile/pyupgrade
- rev: v2.29.1
+ rev: v2.31.0
hooks:
- id: pyupgrade
args: ["--py37-plus"]
- repo: https://github.com/psf/black
- rev: 21.12b0
+ rev: 22.1.0
hooks:
- id: black
args: ["--target-version", "py37"]

MODIFY
src/urllib3/connectionpool.py
src/urllib3/connectionpool.py
@@ -777,8 +777,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
new_e: Exception = e
if isinstance(e, (BaseSSLError, CertificateError)):
new_e = SSLError(e)
- if (
- isinstance(
+ if isinstance(
new_e,
(
OSError,
@@ -787,9 +786,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
SSLError,
HTTPException,
),
- )
- and (conn and conn._connecting_to_proxy)
- ):
+ ) and (conn and conn._connecting_to_proxy):
new_e = _wrap_proxy_error(new_e)
elif isinstance(new_e, (OSError, HTTPException)):
new_e = ProtocolError("Connection aborted.", new_e)

Update pyupgrade and black. (#2555)