Skip to content

feat: allow explicit variable bound to be passed to Name #241

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Apr 28, 2025

this allows for directly providing the type to which a Name expression evaluates to:

from app_model.expressions import Name

is_running = Name("is_running", bound=bool)
reveal_type(is_running.eval())  # Revealed type is "builtins.bool"

also updates pre-commit

Copy link

codecov bot commented Apr 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (1ac9973) to head (dc8286b).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #241   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           31        31           
  Lines         1914      1913    -1     
=========================================
- Hits          1914      1913    -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tlambert03
Copy link
Member Author

@jni or @Czaki ... do you guys know what might be going on with the failed napari test here? https://github.com/pyapp-kit/app-model/actions/runs/14710881217/job/41282696495?pr=241

@jni
Copy link

jni commented Apr 29, 2025

It's napari/napari-plugin-manager#151, sorry about that! Looks like a fix is incoming. (napari/napari-plugin-manager#152) 🙏

@jni
Copy link

jni commented Apr 29, 2025

(ie safe to ignore the failure, will be fixed separately)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants