click icon indicating copy to clipboard operation
click copied to clipboard

Add support for `set` and `frozenset` (and `dict`?) as native Click types

Open kdeldycke opened this issue 4 months ago • 5 comments

Context

This is a follow-up on https://github.com/pallets/click/issues/2610. Half of the latter has been solved by #3030. This ticket contain the other half that was not fixed by #3030.

CC @drunkwcodes

kdeldycke avatar Aug 13 '25 12:08 kdeldycke

I am unclear what this issue is for. @kdeldycke can you please be more specific. Is it for adding the param types for set, frozenset, dict? I saw the test that shows there is a way to instantiate the types.

Rowlando13 avatar Sep 26 '25 16:09 Rowlando13

I am unclear what this issue is for. @kdeldycke can you please be more specific. Is it for adding the param types for set, frozenset, dict? I saw the test that shows there is a way to instantiate the types.

My goal is to start sparkling these native types in the various unit tests. And just search for edge-cases and inconsistent behavior. A bit like fuzzy testing. If everything's fine then we will have additional tests. If not I will start a discussion and propose code to fix stuff. That's it ! :)

kdeldycke avatar Sep 29 '25 10:09 kdeldycke

Got it.

Rowlando13 avatar Sep 30 '25 00:09 Rowlando13

Could you describe what you expect to happen with these types? tuple is pretty clear, it indicates a compound type, and data from the CLI is fixed, not a mutable list.

davidism avatar Sep 30 '25 05:09 davidism

Could you describe what you expect to happen with these types? tuple is pretty clear, it indicates a compound type, and data from the CLI is fixed, not a mutable list.

I created this ticket to not hide under the rug the concerns raised about these types in #2610, so I could close the later. And also based on some gut feelings. But if this is too speculative for now, we can close it as too vague. I may come back in the future with a more material proposition in the form of a PR.

kdeldycke avatar Oct 08 '25 09:10 kdeldycke