Skip to content

Commit

Permalink
CTX-6123: Code format cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Tintor committed Sep 3, 2024
1 parent cff9c74 commit da4cb80
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion coretex/cli/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ def wrapper(*args: Any, **kwargs: Any) -> Any:
# Call the main command function
return f(*args, **kwargs)

return click.command(name = name, cls=cls, **attrs)(wrapper) # type: ignore
return click.command(name = name, cls = cls, **attrs)(wrapper) # type: ignore

return decorator
4 changes: 2 additions & 2 deletions coretex/cli/modules/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ def getTagFromImageUrl(image: str) -> str:
def shouldUpdate(image: str) -> bool:
repository = getRepoFromImageUrl(image)
try:
imageJson = docker.imageInspect(image, CLISettings.verbose)
imageJson = docker.imageInspect(image)
except CommandException:
# imageInspect() will raise an error if image doesn't exist locally
return True

try:
manifestJson = docker.manifestInspect(image, CLISettings.verbose)
manifestJson = docker.manifestInspect(image)
except CommandException:
return False

Expand Down
4 changes: 2 additions & 2 deletions coretex/utils/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def removeContainer(name: str, verbose: Optional[bool] = False) -> None:
command(["docker", "rm", name], ignoreStdout = not verbose, ignoreStderr = True)


def manifestInspect(image: str, verbose: Optional[bool] = False) -> Dict[str, Any]:
def manifestInspect(image: str) -> Dict[str, Any]:
_, output, _ = command(["docker", "manifest", "inspect", image, "--verbose"], ignoreStdout = True)
jsonOutput = json.loads(output)
if not isinstance(jsonOutput, dict):
Expand All @@ -159,7 +159,7 @@ def manifestInspect(image: str, verbose: Optional[bool] = False) -> Dict[str, An
return jsonOutput


def imageInspect(image: str, verbose: Optional[bool] = False) -> Dict[str, Any]:
def imageInspect(image: str) -> Dict[str, Any]:
_, output, _ = command(["docker", "image", "inspect", image], ignoreStdout = True, ignoreStderr = True)
jsonOutput = json.loads(output)
if not isinstance(jsonOutput, list):
Expand Down

0 comments on commit da4cb80

Please sign in to comment.