Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-Selection widget #265

Merged
merged 3 commits into from
Aug 19, 2021
Merged

Conversation

tlambert03
Copy link
Member

closes #229 by implementing a multi-select variant of the CategoricalWidget (i.e. ListWidget instead of ComboBox)

@magicgui(
    pick_some={
        "choices": ["first", "second", "third", "fourth"],
        "allow_multiple": True,
    }
)
def my_widget(pick_some=["first"]):
    print("you selected", pick_some)

Untitled

@codecov
Copy link

codecov bot commented Jul 29, 2021

Codecov Report

Merging #265 (a0b3e64) into master (98d7ba7) will decrease coverage by 0.21%.
The diff coverage is 76.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #265      +/-   ##
==========================================
- Coverage   90.70%   90.48%   -0.22%     
==========================================
  Files          28       28              
  Lines        3109     3164      +55     
==========================================
+ Hits         2820     2863      +43     
- Misses        289      301      +12     
Impacted Files Coverage Δ
magicgui/backends/_qtpy/__init__.py 100.00% <ø> (ø)
magicgui/widgets/__init__.py 100.00% <ø> (ø)
magicgui/backends/_qtpy/widgets.py 86.96% <74.19%> (-0.81%) ⬇️
magicgui/widgets/_bases/categorical_widget.py 84.50% <83.33%> (-0.57%) ⬇️
magicgui/type_map.py 91.42% <100.00%> (+0.09%) ⬆️
magicgui/widgets/_concrete.py 84.27% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98d7ba7...a0b3e64. Read the comment docs.

@tlambert03 tlambert03 merged commit eb21d14 into pyapp-kit:master Aug 19, 2021
@tlambert03 tlambert03 deleted the selection branch August 19, 2021 19:43
@tlambert03 tlambert03 added the enhancement New feature or request label Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Categorical Widget that allows for Multi-Select
1 participant