Skip to content

feat: annotated argpare adding support for frozenset#1691

Merged
tleonhardt merged 3 commits into
mainfrom
feat/annotated-frozenset
Jun 11, 2026
Merged

feat: annotated argpare adding support for frozenset#1691
tleonhardt merged 3 commits into
mainfrom
feat/annotated-frozenset

Conversation

@KelvinChung2000

Copy link
Copy Markdown
Contributor

close #1685

frozenset[T] joins list/set/tuple as a supported collection annotation:
it registers the same single-arg collection resolver, coerces the parsed
values into a frozenset, and rejects nested collections like the others.
Adds a do_tags example and parametrizes the container runtime-cast test
(which now also covers frozenset).
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.57%. Comparing base (6c6d844) to head (9ea292f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1691   +/-   ##
=======================================
  Coverage   99.57%   99.57%           
=======================================
  Files          23       23           
  Lines        5678     5678           
=======================================
  Hits         5654     5654           
  Misses         24       24           
Flag Coverage Δ
unittests 99.57% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

tleonhardt
tleonhardt previously approved these changes Jun 11, 2026
Comment thread cmd2/annotated.py
Address review feedback on #1691: frozenset[T] was functionally
supported but the error messages and docstrings enumerating the
supported collection types still only mentioned list/set/tuple.
Update those strings so exceptions and docs accurately list
frozenset, and add a CHANGELOG entry for the new collection type.

@tleonhardt tleonhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider if the user-facing documentation under docs/ should be updated for this.

I'll merge it in as-is. If you think the documentation should be updated, that can come later.

@tleonhardt tleonhardt merged commit 99173cc into main Jun 11, 2026
29 checks passed
@tleonhardt tleonhardt deleted the feat/annotated-frozenset branch June 11, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

with_annotated should support frozenset

2 participants