Skip to content

Commit 45fa865

Browse files
committed
fix formatting
1 parent 17d5b2b commit 45fa865

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

tasks.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ def run_command(context, exec_cmd, port=None):
7878
print(f"LOCAL - Running command {exec_cmd}")
7979
result = context.run(exec_cmd, pty=True)
8080
else:
81-
print(
82-
f"DOCKER - Running command: {exec_cmd} container: {context.pyntc.image_name}:{context.pyntc.image_ver}"
83-
)
81+
print(f"DOCKER - Running command: {exec_cmd} container: {context.pyntc.image_name}:{context.pyntc.image_ver}")
8482
if port:
8583
result = context.run(
8684
f"docker run -it -p {port} -v {context.pyntc.pwd}:/local {context.pyntc.image_name}:{context.pyntc.image_ver} sh -c '{exec_cmd}'",
@@ -114,23 +112,15 @@ def build(context, cache=True, force_rm=False, hide=False):
114112

115113
result = context.run(command, hide=hide)
116114
if result.exited != 0:
117-
print(
118-
f"Failed to build image {context.pyntc.image_name}:{context.pyntc.image_ver}\nError: {result.stderr}"
119-
)
115+
print(f"Failed to build image {context.pyntc.image_name}:{context.pyntc.image_ver}\nError: {result.stderr}")
120116

121117

122118
@task
123119
def clean(context):
124120
"""Remove the project specific image."""
125-
print(
126-
f"Attempting to forcefully remove image {context.pyntc.image_name}:{context.pyntc.image_ver}"
127-
)
128-
context.run(
129-
f"docker rmi {context.pyntc.image_name}:{context.pyntc.image_ver} --force"
130-
)
131-
print(
132-
f"Successfully removed image {context.pyntc.image_name}:{context.pyntc.image_ver}"
133-
)
121+
print(f"Attempting to forcefully remove image {context.pyntc.image_name}:{context.pyntc.image_ver}")
122+
context.run(f"docker rmi {context.pyntc.image_name}:{context.pyntc.image_ver} --force")
123+
print(f"Successfully removed image {context.pyntc.image_name}:{context.pyntc.image_ver}")
134124

135125

136126
@task

0 commit comments

Comments
 (0)