Blacken using black==20.8b1
MODIFY
src/urllib3/contrib/_securetransport/low_level.py
src/urllib3/contrib/_securetransport/low_level.py
@@ -63,7 +63,9 @@ def _cfstr(py_bstr):
"""
c_str = ctypes.c_char_p(py_bstr)
cf_str = CoreFoundation.CFStringCreateWithCString(
- CoreFoundation.kCFAllocatorDefault, c_str, CFConst.kCFStringEncodingUTF8,
+ CoreFoundation.kCFAllocatorDefault,
+ c_str,
+ CFConst.kCFStringEncodingUTF8,
)
return cf_str

MODIFY
test/test_util.py
test/test_util.py
@@ -827,7 +827,9 @@ class TestUtilSSL(object):
mock_context = Mock()
with patch("warnings.warn") as warn:
ssl_wrap_socket(
- ssl_context=mock_context, sock=sock, server_hostname=server_hostname,
+ ssl_context=mock_context,
+ sock=sock,
+ server_hostname=server_hostname,
)
return mock_context, warn

MODIFY
test/with_dummyserver/test_https.py
test/with_dummyserver/test_https.py
@@ -713,9 +713,10 @@ class TestHTTPS(HTTPSDummyServerTestCase):
assert keylog_file.check(file=1), "keylogfile '%s' should exist" % str(
keylog_file
)
- assert keylog_file.read().startswith("# TLS secrets log file"), (
- "keylogfile '%s' should start with '# TLS secrets log file'"
- % str(keylog_file)
+ assert keylog_file.read().startswith(
+ "# TLS secrets log file"
+ ), "keylogfile '%s' should start with '# TLS secrets log file'" % str(
+ keylog_file
)
def test_alpn_default(self):

MODIFY
test/with_dummyserver/test_proxy_poolmanager.py
test/with_dummyserver/test_proxy_poolmanager.py
@@ -38,7 +38,10 @@ class TestHTTPProxyManager(HTTPDummyProxyTestCase):
cls.https_url = "https://%s:%d" % (cls.https_host, cls.https_port)
cls.https_url_alt = "https://%s:%d" % (cls.https_host_alt, cls.https_port)
cls.proxy_url = "http://%s:%d" % (cls.proxy_host, cls.proxy_port)
- cls.https_proxy_url = "https://%s:%d" % (cls.proxy_host, cls.https_proxy_port,)
+ cls.https_proxy_url = "https://%s:%d" % (
+ cls.proxy_host,
+ cls.https_proxy_port,
+ )
# Generate another CA to test verification failure
cls.certs_dir = tempfile.mkdtemp()

Blacken using black==20.8b1