fix(cli): drop deprecated --nodata/--autosave and warn on legacy flag aliases - #2245
Merged
Merged
Conversation
wkentaro
force-pushed
the
fix/2232-deprecated-cli-flags
branch
2 times, most recently
from
June 23, 2026 11:57
c1e4a57 to
27b7765
Compare
wkentaro
force-pushed
the
fix/2232-deprecated-cli-flags
branch
from
June 23, 2026 12:05
27b7765 to
fe84b73
Compare
Owner
Author
Verdict: Own PR finalize, all checks pass.
No spin-off issues; the change is self-contained. |
Owner
Author
Follow-up: migrated the example docs off the deprecated flag spellings too, so the documented commands no longer emit
Folded into the existing commit and force-pushed ( |
1 task
pull Bot
pushed a commit
to Mu-L/labelme
that referenced
this pull request
Jul 1, 2026
Adds the missing [Unreleased] entries for color theme / dark mode (wkentaro#2260), out-of-bounds points (wkentaro#2223), import-surface privatization (wkentaro#2253), --autosave/--nodata removal (wkentaro#2245), and nine bug fixes. Never-released regressions fixed within the Qt6 cycle are intentionally omitted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2232
Part of the v7 effort. The CLI is the one public contract that gets deprecate-then-remove discipline, so the two flag categories are treated differently.
Summary
--nodataand--autosave: they already warned and were no-ops (image-data-off and autosave-on are the defaults). They now error as unknown arguments.--nosortlabels,--labelflags,--validatelabelkeep working but now emit aFutureWarningpointing to the canonical--no-sort-labels/--label-flags/--validate-label. Removal is deferred to v8.argparse.Action(_DeprecatedAlias) that fires at parse time based on the matchedoption_string, so the alias list lives only in theadd_argumentcalls (single source of truth) and abbreviations /=valueforms are covered too.Test plan
tests/unit/__main___test.py(removed flags error with exit 2; each alias warns pointing to its canonical, incl. an argparse abbreviation; canonical flags emit no warning)--nodata/--autosave-> unknown-argument error;--nosortlabels/--validatelabel=exact/--nosort-> FutureWarning;--validate-label exact-> no warning;--validatelabel bad-> invalid-choice erroruv run pytest tests/(628 passed)make lint(ruff format/check, ty, taplo)