mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 03:46:55 +00:00
Make CI pass; add black and isort to CI; add reformat commit to .git-blame-ignore-revs.
This commit is contained in:
@@ -43,9 +43,9 @@ except ImportError:
|
||||
|
||||
try:
|
||||
from requests.packages import urllib3 # pylint: disable=unused-import
|
||||
from requests.packages.urllib3 import (
|
||||
connection as urllib3_connection, # pylint: disable=unused-import
|
||||
)
|
||||
|
||||
# pylint: disable-next=unused-import
|
||||
from requests.packages.urllib3 import connection as urllib3_connection
|
||||
except ImportError:
|
||||
try:
|
||||
import urllib3 # pylint: disable=unused-import
|
||||
|
||||
@@ -231,7 +231,7 @@ class APIClient(_Session, DaemonApiMixin):
|
||||
return version_result["ApiVersion"]
|
||||
except KeyError:
|
||||
raise DockerException(
|
||||
'Invalid response from docker daemon: key "ApiVersion"' " is missing."
|
||||
'Invalid response from docker daemon: key "ApiVersion" is missing.'
|
||||
)
|
||||
except Exception as e:
|
||||
raise DockerException(
|
||||
|
||||
@@ -68,7 +68,7 @@ class TLSConfig(object):
|
||||
tls_cert, tls_key = client_cert
|
||||
except ValueError:
|
||||
raise errors.TLSParameterError(
|
||||
"client_cert must be a tuple of" " (client certificate, key file)"
|
||||
"client_cert must be a tuple of (client certificate, key file)"
|
||||
)
|
||||
|
||||
if not (tls_cert and tls_key) or (
|
||||
|
||||
@@ -59,7 +59,7 @@ class NpipeHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool):
|
||||
if self.block:
|
||||
raise urllib3.exceptions.EmptyPoolError(
|
||||
self,
|
||||
"Pool reached maximum size and no more " "connections are allowed.",
|
||||
"Pool reached maximum size and no more connections are allowed.",
|
||||
)
|
||||
pass # Oh well, we'll create a new connection then
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ class SSHSocket(socket.socket):
|
||||
def _write(self, data):
|
||||
if not self.proc or self.proc.stdin.closed:
|
||||
raise Exception(
|
||||
"SSH subprocess not initiated." "connect() must be called first."
|
||||
"SSH subprocess not initiated. connect() must be called first."
|
||||
)
|
||||
written = self.proc.stdin.write(data)
|
||||
self.proc.stdin.flush()
|
||||
@@ -96,7 +96,7 @@ class SSHSocket(socket.socket):
|
||||
def recv(self, n):
|
||||
if not self.proc:
|
||||
raise Exception(
|
||||
"SSH subprocess not initiated." "connect() must be called first."
|
||||
"SSH subprocess not initiated. connect() must be called first."
|
||||
)
|
||||
return self.proc.stdout.read(n)
|
||||
|
||||
@@ -166,7 +166,7 @@ class SSHConnectionPool(urllib3.connectionpool.HTTPConnectionPool):
|
||||
if self.block:
|
||||
raise urllib3.exceptions.EmptyPoolError(
|
||||
self,
|
||||
"Pool reached maximum size and no more " "connections are allowed.",
|
||||
"Pool reached maximum size and no more connections are allowed.",
|
||||
)
|
||||
pass # Oh well, we'll create a new connection then
|
||||
|
||||
|
||||
Reference in New Issue
Block a user