pyapp-kit / magicgui

build GUIs from type annotations
https://pyapp-kit.github.io/magicgui/
MIT License
362 stars 49 forks source link

style: use `Unpack` for better kwargs typing #599

Closed tlambert03 closed 11 months ago

tlambert03 commented 11 months ago

this PR uses Unpack to provide nicer static IDE completion for all the places where widget kwargs are passed through a chain of super calls.

These changes have no runtime effects

codecov[bot] commented 11 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (2eaa144) 87.68% compared to head (e7e0cef) 87.85%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #599 +/- ## ========================================== + Coverage 87.68% 87.85% +0.16% ========================================== Files 39 39 Lines 4573 4561 -12 ========================================== - Hits 4010 4007 -3 + Misses 563 554 -9 ``` | [Files](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit) | Coverage Δ | | |---|---|---| | [src/magicgui/signature.py](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL21hZ2ljZ3VpL3NpZ25hdHVyZS5weQ==) | `96.47% <100.00%> (+0.04%)` | :arrow_up: | | [src/magicgui/type\_map/\_magicgui.py](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL21hZ2ljZ3VpL3R5cGVfbWFwL19tYWdpY2d1aS5weQ==) | `96.15% <100.00%> (-0.08%)` | :arrow_down: | | [src/magicgui/widgets/\_concrete.py](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL21hZ2ljZ3VpL3dpZGdldHMvX2NvbmNyZXRlLnB5) | `89.40% <100.00%> (+0.93%)` | :arrow_up: | | [src/magicgui/widgets/\_table.py](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL21hZ2ljZ3VpL3dpZGdldHMvX3RhYmxlLnB5) | `96.14% <100.00%> (+<0.01%)` | :arrow_up: | | [src/magicgui/widgets/bases/\_button\_widget.py](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL21hZ2ljZ3VpL3dpZGdldHMvYmFzZXMvX2J1dHRvbl93aWRnZXQucHk=) | `100.00% <100.00%> (ø)` | | | [src/magicgui/widgets/bases/\_categorical\_widget.py](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL21hZ2ljZ3VpL3dpZGdldHMvYmFzZXMvX2NhdGVnb3JpY2FsX3dpZGdldC5weQ==) | `80.28% <ø> (ø)` | | | [src/magicgui/widgets/bases/\_container\_widget.py](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL21hZ2ljZ3VpL3dpZGdldHMvYmFzZXMvX2NvbnRhaW5lcl93aWRnZXQucHk=) | `91.13% <100.00%> (-0.05%)` | :arrow_down: | | [src/magicgui/widgets/bases/\_ranged\_widget.py](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL21hZ2ljZ3VpL3dpZGdldHMvYmFzZXMvX3JhbmdlZF93aWRnZXQucHk=) | `91.73% <100.00%> (+2.67%)` | :arrow_up: | | [src/magicgui/widgets/bases/\_slider\_widget.py](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL21hZ2ljZ3VpL3dpZGdldHMvYmFzZXMvX3NsaWRlcl93aWRnZXQucHk=) | `96.77% <100.00%> (ø)` | | | [src/magicgui/widgets/bases/\_value\_widget.py](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL21hZ2ljZ3VpL3dpZGdldHMvYmFzZXMvX3ZhbHVlX3dpZGdldC5weQ==) | `98.33% <ø> (ø)` | | | ... and [1 more](https://app.codecov.io/gh/pyapp-kit/magicgui/pull/599?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.