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

fix: allow future annotations in ipywidgets backend #609

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Oct 24, 2023

Because the ipywidgets backend uses type hints to determine the composed widget type:

class _IPyWidget(protocols.WidgetProtocol):
    _ipywidget: ipywdg.Widget

I access the hints at runtime. This makes that more robust and allows __future__ annotations

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (48c94e2) 87.75% compared to head (cce3cef) 87.75%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #609   +/-   ##
=======================================
  Coverage   87.75%   87.75%           
=======================================
  Files          40       40           
  Lines        4705     4705           
=======================================
  Hits         4129     4129           
  Misses        576      576           
Files Coverage Δ
src/magicgui/backends/_ipynb/widgets.py 61.34% <100.00%> (ø)

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

@tlambert03 tlambert03 merged commit aa38630 into pyapp-kit:main Oct 24, 2023
34 checks passed
@tlambert03 tlambert03 deleted the annotations-ipy branch October 24, 2023 23:26
@tlambert03 tlambert03 added the bug Something isn't working label Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant