diff --git a/pkgs/clan-cli/clan_cli/ssh/deploy_info.py b/pkgs/clan-cli/clan_cli/ssh/deploy_info.py index cb3e0bf8d..223f7d617 100644 --- a/pkgs/clan-cli/clan_cli/ssh/deploy_info.py +++ b/pkgs/clan-cli/clan_cli/ssh/deploy_info.py @@ -58,10 +58,7 @@ def ssh_command(args: argparse.Namespace) -> None: raise ClanError(msg) # Convert ssh_option list to dictionary - ssh_options = {} - if args.ssh_option: - for name, value in args.ssh_option: - ssh_options[name] = value + ssh_options = dict(args.ssh_option) if args.ssh_option else {} remote = remote.override( host_key_check=args.host_key_check, diff --git a/pkgs/clan-cli/openapi.py b/pkgs/clan-cli/openapi.py index 726448df7..5b27ac98f 100644 --- a/pkgs/clan-cli/openapi.py +++ b/pkgs/clan-cli/openapi.py @@ -105,11 +105,10 @@ def fix_nullables(schema: dict) -> dict: if isinstance(schema, dict): if "type" in schema and schema["type"] == "null": # Convert 'type: null' to 'nullable: true' - new_schema = {"nullable": True} # Merge any other keys from original schema except type - for k, v in schema.items(): - if k != "type": - new_schema[k] = v + new_schema = {"nullable": True} | { + k: v for k, v in schema.items() if k != "type" + } return fix_nullables(new_schema) # If 'oneOf' present