Skip to content

Commit

Permalink
Formatting due to flake8 indent requirements
Browse files Browse the repository at this point in the history
Signed-off-by: Marty Berryman <mberryman@sewerai.com>
  • Loading branch information
mqarty authored and Marty Berryman committed Jun 1, 2021
1 parent f073ef5 commit 6b55f61
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
11 changes: 8 additions & 3 deletions docker/api/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ def create_container(self, image, command=None, hostname=None, user=None,
.. code-block:: python
client.api.create_host_config(port_bindings={1111: ('127.0.0.1', 4567)})
client.api.create_host_config(
port_bindings={1111: ('127.0.0.1', 4567)}
)
Or without host port assignment:
Expand Down Expand Up @@ -581,8 +583,11 @@ def create_host_config(self, *args, **kwargs):
Example:
>>> client.api.create_host_config(privileged=True, cap_drop=['MKNOD'],
volumes_from=['nostalgic_newton'])
>>> client.api.create_host_config(
privileged=True,
cap_drop=['MKNOD'],
volumes_from=['nostalgic_newton']
)
{'CapDrop': ['MKNOD'], 'LxcConf': None, 'Privileged': True,
'VolumesFrom': ['nostalgic_newton'], 'PublishAllPorts': False}
Expand Down
8 changes: 6 additions & 2 deletions docker/api/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ def pull(self, repository, tag=None, stream=False, auth_config=None,
Example:
>>> for line in client.api.pull('busybox', stream=True, decode=True):
>>> for line in client.api.pull(
'busybox', stream=True, decode=True
):
... print(json.dumps(line, indent=4))
{
"status": "Pulling image (latest) from busybox",
Expand Down Expand Up @@ -458,7 +460,9 @@ def push(self, repository, tag=None, stream=False, auth_config=None,
If the server returns an error.
Example:
>>> for line in client.api.push('yourname/app', stream=True, decode=True):
>>> for line in client.api.push(
'yourname/app', stream=True, decode=True
):
... print(line)
{'status': 'Pushing repository yourname/app (1 tags)'}
{'status': 'Pushing','progressDetail': {}, 'id': '511136ea3c5a'}
Expand Down

0 comments on commit 6b55f61

Please sign in to comment.