continuing refactor

This commit is contained in:
2026-05-03 21:20:05 -07:00
parent 77cab1bd27
commit 5534812426
50 changed files with 1004 additions and 428 deletions
+7 -8
View File
@@ -282,7 +282,7 @@ def _refresh_tag_view_if_current(
return payload
refresh_subject = _build_refresh_subject()
# Do not pass -store here as it triggers emit_mode/quiet in get-tag
# Do not pass -instance here as it triggers emit_mode/quiet in get-tag
with ctx.suspend_live_progress():
get_tag(refresh_subject, refresh_args, config)
except Exception:
@@ -388,10 +388,10 @@ def _parse_delete_tag_arguments(arguments: Sequence[str]) -> list[str]:
CMDLET = Cmdlet(
name="delete-tag",
summary="Remove tags from a file in a store.",
usage='delete-tag -store <store> [-query "hash:<sha256>"] <tag>[,<tag>...]',
usage='delete-tag -instance <store> [-query "hash:<sha256>"] <tag>[,<tag>...]',
arg=[
SharedArgs.QUERY,
SharedArgs.STORE,
SharedArgs.INSTANCE,
CmdletArg(
"<tag>[,<tag>...]",
required=True,
@@ -439,7 +439,7 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
list) and bool(result) and _looks_like_tag_row(result[0])
)
# Parse -query/-store overrides and collect remaining args.
# Parse -query/-instance overrides and collect remaining args.
override_query: str | None = None
override_hash: str | None = None
override_store: str | None = None
@@ -454,9 +454,8 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
override_query = str(args[i + 1]).strip()
i += 2
continue
if low in {"-store",
"--store",
"store"} and i + 1 < len(args):
if low in {"-instance",
"--instance"} and i + 1 < len(args):
override_store = str(args[i + 1]).strip()
i += 2
continue
@@ -618,7 +617,7 @@ def _process_deletion(
if not store_name:
log(
"Store is required (use -store or pipe a result with store)",
"Store is required (use -instance or pipe a result with store)",
file=sys.stderr
)
return False